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

Function main

tools/dla.rs:96–130  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

94 }
95}
96fn main() -> eyre::Result<()> {
97 color_eyre::install()?;
98 let args = CmdlineOptions::parse();
99
100 let filter = tracing_subscriber::EnvFilter::builder()
101 .with_default_directive(args.log_level.into())
102 .from_env_lossy();
103 tracing_subscriber::fmt()
104 .with_env_filter(filter)
105 .with_ansi(true)
106 .with_writer(std::io::stderr)
107 .init();
108
109 let mut model = Model::new(
110 args.dimensions,
111 // TODO: Seed type.
112 args.seeds,
113 args.seed,
114 args.particle_spacing,
115 args.attraction_distance,
116 args.min_move_distance,
117 args.stubbornness,
118 args.stickiness,
119 );
120
121 model.run(args.particles);
122
123 tracing::trace!("Model {model:?}");
124
125 let mut writer = args.get_output_writer();
126 match args.format {
127 OutputFormat::Tgf => format_tgf(&mut writer, model.particle_graph),
128 OutputFormat::Wkt => format_wkt(&mut writer, model.particle_graph),
129 }
130}

Callers

nothing calls this directly

Calls 4

format_tgfFunction · 0.85
format_wktFunction · 0.85
runMethod · 0.80
get_output_writerMethod · 0.80

Tested by

no test coverage detected