Struct light_curve_dmdt::LgGrid
source · 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