proper doc comments
This commit is contained in:
15
src/model.rs
15
src/model.rs
@@ -10,21 +10,21 @@ use rand_distr::{Distribution, Normal};
|
||||
use rayon::{iter::ParallelIterator, prelude::*};
|
||||
use std::time::Instant;
|
||||
|
||||
// Top-level simulation class.
|
||||
/// Top-level simulation class.
|
||||
pub struct Model {
|
||||
// per-population grid (one for each population)
|
||||
/// per-population grid (one for each population)
|
||||
population_grids: Vec<Grid>,
|
||||
|
||||
// Attraction table governs interaction across populations
|
||||
/// Attraction table governs interaction across populations
|
||||
attraction_table: Vec<Vec<f32>>,
|
||||
|
||||
// Global grid diffusivity.
|
||||
/// Global grid diffusivity.
|
||||
diffusivity: usize,
|
||||
|
||||
// Current model iteration.
|
||||
/// Current model iteration.
|
||||
iteration: usize,
|
||||
|
||||
// Color palette
|
||||
/// Color palette
|
||||
palette: Palette,
|
||||
|
||||
time_per_agent_list: Vec<f64>,
|
||||
@@ -44,7 +44,7 @@ impl Model {
|
||||
println!("Attraction table: {:#?}", self.attraction_table);
|
||||
}
|
||||
|
||||
// Construct a new model with random initial conditions and random configuration.
|
||||
/// Construct a new model with random initial conditions and random configuration.
|
||||
pub fn new(
|
||||
width: usize,
|
||||
height: usize,
|
||||
@@ -132,7 +132,6 @@ impl Model {
|
||||
);
|
||||
}
|
||||
|
||||
// Accessors for rendering
|
||||
pub fn population_grids(&self) -> &[Grid] {
|
||||
&self.population_grids
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user