MCPcopy Create free account
hub / github.com/Notgnoshi/generative / Model

Class Model

generative/dla.rs:28–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26
27#[derive(Debug)]
28pub struct Model {
29 /// The particles and their parent associations.
30 pub particle_graph: GraphType,
31
32 /// The particle graph holds all of the Particles. The spatial index just exists
33 /// to accelerate nearest neighbor lookup, and will hold the coordinates and
34 /// node indices into the particle graph.
35 /// TODO: Variable dimensionality
36 /// TODO: Figure out how to store a reference to an ndarray::Array1 in the index
37 index: KdTree<DimensionType, NodeIndex, [DimensionType; 2]>,
38 rng: StdRng,
39
40 /// Particle dimensionality
41 #[allow(dead_code)]
42 dimensions: u8,
43
44 // Tunable parameters
45 bounding_radius: f64,
46 particle_spacing: f64,
47 attraction_distance: f64,
48 min_move_distance: f64,
49 stubbornness: usize,
50 stickiness: f64,
51}
52
53impl Model {
54 /// Create a new model with the given tunable parameters.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected