pub struct Example {
pub input: QualifiedGrid,
pub output: QualifiedGrid,
pub cat: BTreeSet<GridCategory>,
pub pairs: Vec<(Shape, Shape, bool)>,
pub coloured_pairs: Vec<(Shape, Shape, bool)>,
}Fields§
§input: QualifiedGrid§output: QualifiedGrid§cat: BTreeSet<GridCategory>§pairs: Vec<(Shape, Shape, bool)>§coloured_pairs: Vec<(Shape, Shape, bool)>Implementations§
Source§impl Example
impl Example
pub fn new(data: &IO) -> Self
pub fn new_cons(data: &IO) -> Self
pub fn transform(&self, trans: Transformation, input: bool) -> Self
pub fn transform_mut(&mut self, trans: Transformation, input: bool)
pub fn is_equal(&self) -> bool
pub fn is_bigger(&self) -> bool
pub fn is_smaller(&self) -> bool
pub fn diff(&self) -> Option<Grid>
pub fn categorise_grid( input: &QualifiedGrid, output: &QualifiedGrid, ) -> BTreeSet<GridCategory>
pub fn single_shape_in(&self) -> usize
pub fn single_shape_out(&self) -> usize
pub fn single_coloured_shape_in(&self) -> usize
pub fn single_coloured_shape_out(&self) -> usize
pub fn io_colour_diff(&self) -> Colour
pub fn colour_shape_map(&self, out: bool) -> BTreeMap<Colour, Shape>
pub fn colour_attachment_map(&self, out: bool) -> BTreeMap<Colour, bool>
pub fn shape_pixels_to_colour(&self) -> BTreeMap<usize, Colour>
pub fn shape_adjacency_map(&self) -> BTreeMap<Shape, Colour>
pub fn some(&self, isout: bool, f: &dyn Fn(&Shapes) -> Shape) -> Shape
pub fn all(&self, isout: bool) -> Vec<Shape>
pub fn some_coloured(&self, isout: bool, f: &dyn Fn(&Shapes) -> Shape) -> Shape
pub fn all_coloured(&self, isout: bool) -> Vec<Shape>
pub fn map_coloured_shapes_to_shape(&self, _shapes: Vec<Shape>) -> Vec<Shapes>
pub fn colour_cnt_diff(&self, inc: bool) -> Colour
pub fn colour_cnt_inc(&self) -> Colour
pub fn colour_cnt_dec(&self) -> Colour
pub fn split_n_map_horizontal(&self, n: usize) -> BTreeMap<Grid, Grid>
pub fn split_n_map_vertical(&self, n: usize) -> BTreeMap<Grid, Grid>
pub fn majority_dimensions(&self) -> (usize, usize)
Trait Implementations§
impl StructuralPartialEq for Example
Auto Trait Implementations§
impl Freeze for Example
impl RefUnwindSafe for Example
impl Send for Example
impl Sync for Example
impl Unpin for Example
impl UnwindSafe for Example
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more