pub struct LgGrid<T> { /* private fields */ }
Expand description
Logarithmic grid defined by its start, end and number of cells
Lookup time is O(1)
Implementations§
Source§impl<T> LgGrid<T>where
T: Float,
impl<T> LgGrid<T>where
T: Float,
Sourcepub fn from_start_end(start: T, end: T, n: usize) -> Self
pub fn from_start_end(start: T, end: T, n: usize) -> Self
Create LinearGrid from borders and number of cells
start
is the left border of the leftmost cell, end
is the right border of the rightmost
cell, n
is the number of cells. This means that the number of borders is n + 1
, start
border has zero index and end
border has index n
.
Sourcepub fn from_lg_start_end(lg_start: T, lg_end: T, n: usize) -> Self
pub fn from_lg_start_end(lg_start: T, lg_end: T, n: usize) -> Self
Create LinearGrid from decimal logarithms of borders and number of cells
lg_start
is the decimal logarithm of the left border of the leftmost cell, lg_end
is the
decimal logarithm of the right border of the rightmost cell, n
is the number of cells.
This means that the number of borders is n + 1
, lg_start
border has zero index and
lg_end
border has index n
.
Sourcepub fn get_cell_lg_size(&self) -> T
pub fn get_cell_lg_size(&self) -> T
Logarithmic size of cell
Sourcepub fn get_lg_start(&self) -> T
pub fn get_lg_start(&self) -> T
Logarithm of the leftmost border
Sourcepub fn get_lg_end(&self) -> T
pub fn get_lg_end(&self) -> T
Logarithm of the rightmost border
Trait Implementations§
Source§impl<'de, T> Deserialize<'de> for LgGrid<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for LgGrid<T>where
T: Deserialize<'de>,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl<T> GridTrait<T> for LgGrid<T>where
T: Float,
impl<T> GridTrait<T> for LgGrid<T>where
T: Float,
Source§fn get_borders(&self) -> &Array1<T>
fn get_borders(&self) -> &Array1<T>
Source§fn cell_count(&self) -> usize
fn cell_count(&self) -> usize
Auto Trait Implementations§
impl<T> Freeze for LgGrid<T>where
T: Freeze,
impl<T> RefUnwindSafe for LgGrid<T>where
T: RefUnwindSafe,
impl<T> Send for LgGrid<T>where
T: Send,
impl<T> Sync for LgGrid<T>where
T: Sync,
impl<T> Unpin for LgGrid<T>where
T: Unpin,
impl<T> UnwindSafe for LgGrid<T>where
T: UnwindSafe + RefUnwindSafe,
Blanket Implementations§
Source§impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
impl<Src, Scheme> ApproxFrom<Src, Scheme> for Srcwhere
Scheme: ApproxScheme,
Source§fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
fn approx_from(src: Src) -> Result<Src, <Src as ApproxFrom<Src, Scheme>>::Err>
Source§impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
impl<Dst, Src, Scheme> ApproxInto<Dst, Scheme> for Srcwhere
Dst: ApproxFrom<Src, Scheme>,
Scheme: ApproxScheme,
Source§type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
type Err = <Dst as ApproxFrom<Src, Scheme>>::Err
Source§fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
fn approx_into(self) -> Result<Dst, <Src as ApproxInto<Dst, Scheme>>::Err>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, Dst> ConvAsUtil<Dst> for T
impl<T, Dst> ConvAsUtil<Dst> for T
Source§impl<T> ConvUtil for T
impl<T> ConvUtil for T
Source§fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
fn approx_as<Dst>(self) -> Result<Dst, Self::Err>where
Self: Sized + ApproxInto<Dst>,
Source§fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
fn approx_as_by<Dst, Scheme>(self) -> Result<Dst, Self::Err>
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>
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>
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