pub struct Examples {
pub examples: Vec<Example>,
pub tests: Vec<Example>,
pub cat: BTreeSet<GridCategory>,
}Fields§
§examples: Vec<Example>§tests: Vec<Example>§cat: BTreeSet<GridCategory>Implementations§
Source§impl Examples
impl Examples
pub fn new(data: &Data) -> Self
pub fn new_cons(data: &Data) -> Self
pub fn transformation(&self, trans: Transformation) -> Self
pub fn transformation_mut(&mut self, trans: Transformation)
pub fn inverse_transformation(&self, trans: Transformation) -> Self
pub fn inverse_transformation_mut(&mut self, trans: Transformation)
pub fn match_shapes(&self) -> BTreeMap<Shape, Shape>
pub fn full_shapes(&self, input: bool, sq: bool) -> Shapes
pub fn full_shapes_in(&self) -> Shapes
pub fn full_shapes_out(&self) -> Shapes
pub fn full_shapes_in_sq(&self) -> Shapes
pub fn full_shapes_out_sq(&self) -> Shapes
pub fn common(&self, input: bool) -> Grid
pub fn all_shapes(&self, input: bool, sq: bool) -> Shapes
pub fn all_shapes_in(&self) -> Shapes
pub fn all_shapes_out(&self) -> Shapes
pub fn all_shapes_in_sq(&self) -> Shapes
pub fn all_shapes_out_sq(&self) -> Shapes
pub fn some(&self, isout: bool, f: &dyn Fn(&Shapes) -> Shape) -> Vec<Shape>
pub fn all(&self, isout: bool) -> Vec<Shape>
pub fn some_coloured( &self, isout: bool, f: &dyn Fn(&Shapes) -> Shape, ) -> Vec<Shape>
pub fn all_coloured(&self, isout: bool) -> Vec<Shape>
pub fn categorise_grids(examples: &mut [Example]) -> BTreeSet<GridCategory>
pub fn find_input_colours(&self) -> Vec<Colour>
pub fn find_output_colours(&self) -> Vec<Colour>
pub fn find_all_output_colours(&self) -> Vec<Colour>
pub fn find_all_input_colours(&self) -> Vec<Colour>
pub fn io_colour_diff(&self) -> Vec<Colour>
pub fn io_all_colour_diff(&self) -> Vec<Colour>
pub fn io_colour_common(&self) -> Vec<Colour>
pub fn io_common_row_colour(&self) -> Colour
pub fn io_common_col_colour(&self) -> Colour
pub fn find_hollow_cnt_colour_map(&self) -> BTreeMap<usize, Colour>
pub fn find_colour_io_map(&self) -> BTreeMap<Colour, Colour>
pub fn largest_shape_colour(&self) -> Colour
pub fn bleached_io_map(&self) -> BTreeMap<String, Grid>
pub fn in_max_size(&self) -> (usize, usize)
pub fn derive_missing_rule(&self) -> Grid
pub fn shape_pixels_to_colour(&self) -> BTreeMap<usize, Colour>
pub fn shape_adjacency_map(&self) -> BTreeMap<Shape, 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 colour_cnt_diff(&self, inc: bool) -> Colour
pub fn colour_cnt_inc(&self) -> Colour
pub fn colour_cnt_dec(&self) -> Colour
pub fn colour_diffs(&self, inc: bool) -> Vec<Colour>
pub fn colour_incs(&self) -> Vec<Colour>
pub fn colour_decs(&self) -> Vec<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>
Trait Implementations§
impl StructuralPartialEq for Examples
Auto Trait Implementations§
impl Freeze for Examples
impl RefUnwindSafe for Examples
impl Send for Examples
impl Sync for Examples
impl Unpin for Examples
impl UnwindSafe for Examples
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