Skip to content

Commit

Permalink
Rename Representation → ContinuousRepresentation
Browse files Browse the repository at this point in the history
  • Loading branch information
milliams committed Mar 9, 2018
1 parent 31bf08a commit c732707
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use std::f64;
use svg;

use axis;
use representation::Representation;
use representation::ContinuousRepresentation;
use svg_render;
use style;

Expand Down Expand Up @@ -129,7 +129,7 @@ impl Function {
}
}

impl Representation for Function {
impl ContinuousRepresentation for Function {
fn range(&self, dim: u32) -> (f64, f64) {
match dim {
0 => self.x_range(),
Expand Down
4 changes: 2 additions & 2 deletions src/histogram.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ use axis;
use utils::PairWise;
use svg_render;
use text_render;
use representation::Representation;
use representation::ContinuousRepresentation;
use style;

#[derive(Debug, Default)]
Expand Down Expand Up @@ -147,7 +147,7 @@ impl Histogram {
}
}

impl Representation for Histogram {
impl ContinuousRepresentation for Histogram {
fn range(&self, dim: u32) -> (f64, f64) {
match dim {
0 => self.x_range(),
Expand Down
4 changes: 2 additions & 2 deletions src/line.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use std::f64;
use svg;

use axis;
use representation::Representation;
use representation::ContinuousRepresentation;
use svg_render;
use style;

Expand Down Expand Up @@ -116,7 +116,7 @@ impl Line {
}
}

impl Representation for Line {
impl ContinuousRepresentation for Line {
fn range(&self, dim: u32) -> (f64, f64) {
match dim {
0 => self.x_range(),
Expand Down
2 changes: 1 addition & 1 deletion src/representation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use axis;
/**
A representation of data that is continuous in two dimensions.
*/
pub trait Representation {
pub trait ContinuousRepresentation {
/// The maximum range in each dimension. Used for auto-scaling axes.
fn range(&self, dim: u32) -> (f64, f64);

Expand Down
4 changes: 2 additions & 2 deletions src/scatter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use svg;
use axis;
use svg_render;
use text_render;
use representation::Representation;
use representation::ContinuousRepresentation;
use style;

/// `Style` follows the 'optional builder' pattern
Expand Down Expand Up @@ -133,7 +133,7 @@ impl Scatter {
}
}

impl Representation for Scatter {
impl ContinuousRepresentation for Scatter {
fn range(&self, dim: u32) -> (f64, f64) {
match dim {
0 => self.x_range(),
Expand Down
6 changes: 3 additions & 3 deletions src/view.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use std::f64;
use svg;
use svg::Node;

use representation::{DiscreteRepresentation, Representation};
use representation::{DiscreteRepresentation, ContinuousRepresentation};
use axis;
use svg_render;
use text_render;
Expand All @@ -25,7 +25,7 @@ pub trait View {
/// Standard 1-dimensional view with a continuous x-axis
#[derive(Default)]
pub struct ContinuousView<'a> {
representations: Vec<&'a Representation>,
representations: Vec<&'a ContinuousRepresentation>,
x_range: Option<axis::Range>,
y_range: Option<axis::Range>,
x_label: Option<String>,
Expand All @@ -49,7 +49,7 @@ impl<'a> ContinuousView<'a> {
/**
Add a representation to the view
*/
pub fn add(mut self, repr: &'a Representation) -> Self {
pub fn add(mut self, repr: &'a ContinuousRepresentation) -> Self {
self.representations.push(repr);
self
}
Expand Down

0 comments on commit c732707

Please sign in to comment.