pub struct TripGenerator { /* private fields */ }Expand description
Generator for Trip table data
Implementations§
Source§impl TripGenerator
impl TripGenerator
Sourcepub fn new(scale_factor: f64, part: i32, part_count: i32) -> TripGenerator
pub fn new(scale_factor: f64, part: i32, part_count: i32) -> TripGenerator
Creates a new TripGenerator with the given scale factor
Sourcepub fn new_with_distributions_and_text_pool<'b>(
scale_factor: f64,
part: i32,
part_count: i32,
distributions: &'b Distributions,
text_pool: &'b TextPool,
distance_kde: DistanceKDE,
spatial_gen: SpatialGenerator,
) -> TripGenerator
pub fn new_with_distributions_and_text_pool<'b>( scale_factor: f64, part: i32, part_count: i32, distributions: &'b Distributions, text_pool: &'b TextPool, distance_kde: DistanceKDE, spatial_gen: SpatialGenerator, ) -> TripGenerator
Creates a TripGenerator with specified distributions and text pool
Sourcepub fn calculate_row_count(scale_factor: f64, part: i32, part_count: i32) -> i64
pub fn calculate_row_count(scale_factor: f64, part: i32, part_count: i32) -> i64
Return the row count for the given scale factor and generator part count
Sourcepub fn iter(&self) -> TripGeneratorIterator ⓘ
pub fn iter(&self) -> TripGeneratorIterator ⓘ
Returns an iterator over the trip rows
Trait Implementations§
Source§impl Clone for TripGenerator
impl Clone for TripGenerator
Source§fn clone(&self) -> TripGenerator
fn clone(&self) -> TripGenerator
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TripGenerator
impl Debug for TripGenerator
Auto Trait Implementations§
impl !Freeze for TripGenerator
impl RefUnwindSafe for TripGenerator
impl Send for TripGenerator
impl Sync for TripGenerator
impl Unpin for TripGenerator
impl UnsafeUnpin for TripGenerator
impl UnwindSafe for TripGenerator
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