pub fn new(margin: T) -> Self
    where
        T: Clone,
    {
        let margin_two_sides = vec![(margin.clone(), margin)];
        Self {
            should_repeat_margin: true,
            margins: margin_two_sides,
        }
    }
/// Creates a new neighbor calculator with equal margin on all sides and dimensions.
/// ```rust
/// use gol_core::{
///     NeighborsGridSurround, BoardNeighborManager, GridPoint2D, GridPoint3D
/// };
///
/// // Create Conway's Game of Life margin: 1 on each side.
/// let neighbor_calc = NeighborsGridSurround::new(1usize);
/// let cur_point = GridPoint2D{ x: 10, y: 5 };
/// let neighbors: Vec<GridPoint2D<i32>> =
///     neighbor_calc.get_neighbors_idx(&cur_point).collect();
/// assert_eq!(neighbors.len(), 8);
///
/// let neighbor_calc_2 = NeighborsGridSurround::new(1usize);
/// let cur_point = GridPoint3D{ x: 10, y: 5, z: 9};
/// let neighbors_2: Vec<GridPoint3D<i32>> =
///     neighbor_calc_2.get_neighbors_idx(&cur_point).collect();
/// assert_eq!(neighbors_2.len(), 26);
/// ```
Creates a new neighbor calculator with equal margin on all sides and dimensions.

Create Conway's Game of Life margin: 1 on each side.


Creates a new neighbor calculator with equal margin on all sides and dimensions . Create Conway ' s Game of Life margin : 1 on each side .
pub fn new(margin: T) -> Self
    where
        T: Clone,
    {
        let margin_two_sides = vec![(margin.clone(), margin)];
        Self {
            should_repeat_margin: true,
            margins: margin_two_sides,
        }
    }
pub fn new ( margin : T ) -> Self where T : Clone , { let margin_two_sides = vec ! [ ( margin clone ( ) margin ) ] ; Self { should_repeat_margin : true , margins : margin_two_sides , } }
Creates a new neighbor calculator with equal margin on all sides and dimensions.
Creates a new neighbor calculator with equal margin on all sides and dimensions .
margin
T