Struct moc::qty::Time

source ·
pub struct Time<T: Idx>(/* private fields */);
Expand description

Time index (microsec since JD=0)

Trait Implementations§

source§

impl<T: Clone + Idx> Clone for Time<T>

source§

fn clone(&self) -> Time<T>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Debug + Idx> Debug for Time<T>

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl<T> MocQty<T> for Time<T>
where T: Idx,

source§

const MAX_DEPTH: u8 = _

source§

const MAX_SHIFT: u32 = _

source§

fn n_cells_max() -> T

source§

fn n_cells(depth: u8) -> T

source§

fn delta_depth_max_from_n_bits(n_bits: u8) -> u8

Upper bound on the maximum number of depths that can be coded using n_bitsof a MOC index. I.e., maximum possible hierarchy depth on a len = [0, 2^(delta_depth)^dim] => (log(len) / log(2)) / dim = delta_depth
source§

fn delta_depth_max_from_n_bits_unchecked(n_bits: u8) -> u8

Same as delta_depth_max_from_n_bits without checking that the result is smaller than depth_max.
source§

fn delta_with_depth_max(depth: u8) -> u8

source§

fn shift_from_depth_max(depth: u8) -> u8

source§

fn get_msb(x: T) -> u32

source§

fn get_lsb(x: T) -> u32

source§

fn compute_min_depth(x: T) -> u8

source§

fn from_uniq_gen(uniq: T) -> (u8, T)

From generic uniq notation (using a sentinel bit)
source§

fn to_uniq_gen(depth: u8, idx: T) -> T

To generic uniq notation (using a sentinel bit)
source§

fn sentinel_bit(depth: u8) -> T

source§

fn uniq_gen_to_range(uniq: T) -> Range<T>

Range from the genric uniq notation (using a sentinel bit)
source§

fn to_zuniq(depth: u8, idx: T) -> T

zuniq is similar to the uniq notation (i.e. it encodes both the depth and the cell index at this depth), but the natural ordering of the type T preserves the global ordering of the cells, independently of the cells depth. It is similar to the cdshealpix BMOC notation (without the extra bit coding a boolean) and to multi-order-map, but also coding the depth.
source§

fn from_zuniq(zuniq: T) -> (u8, T)

source§

impl<T: Idx> MocableQty for Time<T>

source§

const NAME: &'static str = "TIME"

A simple str to identify the quantity (e.g. in ASCII serialisation)
source§

const PREFIX: char = 't'

A simple char prefix to identify the quantity (e.g. in ASCII serialisation)
source§

const DIM: u8 = 1u8

Dimension of the qty, i.e. number of bits needed to code a sub-cell relative index
source§

const N_D0_CELLS: u8 = 2u8

Number of base cells, i.e. number of cell at depth 0 (usually 2^dim, but 12 in the HEALPix case)
source§

const MOC_DIM: MocDim = MocDim::Time

FITS keyword
source§

const HAS_COOSYS: bool = false

For FITS serialization (TODO: find a better approach)
source§

const HAS_TIMESYS: bool = true

For FITS serialization (TODO: find a better approach)
source§

const HAS_FREQSYS: bool = false

For FITS serialization (TODO: find a better approach)
source§

fn mult_by_dim<U: Idx>(v: U) -> U

v * Self::DIM, generic so that for: Read more
source§

fn div_by_dim<U: Idx>(v: U) -> U

v / Self::DIM, generic so that for: Read more
source§

const N_RESERVED_BITS: u8 = 2u8

Number of bits reserved to code the quantity type
source§

const N_D0_BITS: u8 = _

Number of bits needed to code the base cell index
source§

const LEVEL_MASK: u8 = _

Mask to select the bit(s) of a level > 0: Read more
source§

fn shift(delta_depth: u8) -> u8

source§

impl<T: PartialEq + Idx> PartialEq for Time<T>

source§

fn eq(&self, other: &Time<T>) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<T: Idx, R: BufRead> RangeMOC2Iterator<T, Time<T>, RangeMocIter<T, Time<T>>, T, Hpx<T>, RangeMocIter<T, Hpx<T>>, RangeMOC2Elem<T, Time<T>, T, Hpx<T>>> for RangeMoc2DIterFromFits<T, R>

source§

fn into_range_moc2(self) -> RangeMOC2<T, Q, U, R>

source§

fn stats(self) -> (u64, u64, u64)

Returns a tuple containing: Read more
source§

fn or<I2, J2, K2, L2>( self, rhs: L2 ) -> OrRange2Iter<T, Q, U, R, I, J, K, Self, I2, J2, K2, L2>
where I2: RangeMOCIterator<T, Qty = Q>, J2: RangeMOCIterator<U, Qty = R>, K2: RangeMOC2ElemIt<T, Q, U, R, It1 = I2, It2 = J2>, L2: RangeMOC2Iterator<T, Q, I2, U, R, J2, K2>,

source§

impl<T: Idx, R: BufRead> RangeMOC2Iterator<T, Time<T>, RangeMocIter<T, Time<T>>, T, Hpx<T>, RangeMocIter<T, Hpx<T>>, RangeMOC2Elem<T, Time<T>, T, Hpx<T>>> for RangeMoc2DPreV2IterFromFits<T, R>

source§

fn into_range_moc2(self) -> RangeMOC2<T, Q, U, R>

source§

fn stats(self) -> (u64, u64, u64)

Returns a tuple containing: Read more
source§

fn or<I2, J2, K2, L2>( self, rhs: L2 ) -> OrRange2Iter<T, Q, U, R, I, J, K, Self, I2, J2, K2, L2>
where I2: RangeMOCIterator<T, Qty = Q>, J2: RangeMOCIterator<U, Qty = R>, K2: RangeMOC2ElemIt<T, Q, U, R, It1 = I2, It2 = J2>, L2: RangeMOC2Iterator<T, Q, I2, U, R, J2, K2>,

source§

impl<'a, T: Idx> RangeMOC2Iterator<T, Time<T>, RangeMocIter<T, Time<T>>, T, Hpx<T>, RangeMocIter<T, Hpx<T>>, RangeMOC2Elem<T, Time<T>, T, Hpx<T>>> for TimeSpaceRangesIter<'a, T>

source§

fn into_range_moc2(self) -> RangeMOC2<T, Q, U, R>

source§

fn stats(self) -> (u64, u64, u64)

Returns a tuple containing: Read more
source§

fn or<I2, J2, K2, L2>( self, rhs: L2 ) -> OrRange2Iter<T, Q, U, R, I, J, K, Self, I2, J2, K2, L2>
where I2: RangeMOCIterator<T, Qty = Q>, J2: RangeMOCIterator<U, Qty = R>, K2: RangeMOC2ElemIt<T, Q, U, R, It1 = I2, It2 = J2>, L2: RangeMOC2Iterator<T, Q, I2, U, R, J2, K2>,

source§

impl<T: Eq + Idx> Eq for Time<T>

source§

impl<T: Idx> StructuralPartialEq for Time<T>

Auto Trait Implementations§

§

impl<T> Freeze for Time<T>

§

impl<T> RefUnwindSafe for Time<T>
where T: RefUnwindSafe,

§

impl<T> Send for Time<T>

§

impl<T> Sync for Time<T>

§

impl<T> Unpin for Time<T>
where T: Unpin,

§

impl<T> UnwindSafe for Time<T>
where T: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T, Q> Bounded<T> for Q
where T: Idx, Q: MocQty<T>,

source§

fn upper_bound_exclusive() -> T

The largest possible value (exclusive) for a value of type T of the quantity Q.

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

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 more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.