src/run.rs

changeset 23
9869fa1e0ccd
parent 20
90f77ad9a98d
child 24
d29d1fcf5423
equal deleted inserted replaced
22:9fb8ecb3da74 23:9869fa1e0ccd
324 324
325 impl<F, NoiseDistr, S, K, P, const N : usize> RunnableExperiment<F> for 325 impl<F, NoiseDistr, S, K, P, const N : usize> RunnableExperiment<F> for
326 Named<Experiment<F, NoiseDistr, S, K, P, N>> 326 Named<Experiment<F, NoiseDistr, S, K, P, N>>
327 where F : ClapFloat + nalgebra::RealField + ToNalgebraRealField<MixedType=F>, 327 where F : ClapFloat + nalgebra::RealField + ToNalgebraRealField<MixedType=F>,
328 [usize; N] : Serialize, 328 [usize; N] : Serialize,
329 S : Sensor<F, N> + Copy + Serialize, 329 S : Sensor<F, N> + Copy + Serialize + std::fmt::Debug,
330 P : Spread<F, N> + Copy + Serialize, 330 P : Spread<F, N> + Copy + Serialize + std::fmt::Debug,
331 Convolution<S, P>: Spread<F, N> + Bounded<F> + LocalAnalysis<F, Bounds<F>, N> + Copy, 331 Convolution<S, P>: Spread<F, N> + Bounded<F> + LocalAnalysis<F, Bounds<F>, N> + Copy,
332 AutoConvolution<P> : BoundedBy<F, K>, 332 AutoConvolution<P> : BoundedBy<F, K>,
333 K : SimpleConvolutionKernel<F, N> + LocalAnalysis<F, Bounds<F>, N> + Copy + Serialize, 333 K : SimpleConvolutionKernel<F, N> + LocalAnalysis<F, Bounds<F>, N>
334 + Copy + Serialize + std::fmt::Debug,
334 Cube<F, N>: P2Minimise<Loc<F, N>, F> + SetOrd, 335 Cube<F, N>: P2Minimise<Loc<F, N>, F> + SetOrd,
335 PlotLookup : Plotting<N>, 336 PlotLookup : Plotting<N>,
336 DefaultBT<F, N> : SensorGridBT<F, S, P, N, Depth=DynamicDepth> + BTSearch<F, N>, 337 DefaultBT<F, N> : SensorGridBT<F, S, P, N, Depth=DynamicDepth> + BTSearch<F, N>,
337 BTNodeLookup: BTNode<F, usize, Bounds<F>, N>, 338 BTNodeLookup: BTNode<F, usize, Bounds<F>, N>,
338 DiscreteMeasure<Loc<F, N>, F> : SpikeMerging<F>, 339 DiscreteMeasure<Loc<F, N>, F> : SpikeMerging<F>,
339 NoiseDistr : Distribution<F> + Serialize { 340 NoiseDistr : Distribution<F> + Serialize + std::fmt::Debug {
340 341
341 fn algorithm_defaults(&self, alg : DefaultAlgorithm, cli : &AlgorithmOverrides<F>) 342 fn algorithm_defaults(&self, alg : DefaultAlgorithm, cli : &AlgorithmOverrides<F>)
342 -> Named<AlgorithmConfig<F>> { 343 -> Named<AlgorithmConfig<F>> {
343 alg.to_named( 344 alg.to_named(
344 self.data 345 self.data
359 domain, sensor_count, ref noise_distr, sensor, spread, kernel, 360 domain, sensor_count, ref noise_distr, sensor, spread, kernel,
360 ref μ_hat, α, kernel_plot_width, dataterm, noise_seed, 361 ref μ_hat, α, kernel_plot_width, dataterm, noise_seed,
361 .. 362 ..
362 } 363 }
363 } = self; 364 } = self;
365
366 println!("{}\n{}",
367 format!("Performing experiment {}…", experiment_name).cyan(),
368 format!("{:?}", &self.data).bright_black());
364 369
365 // Set up output directory 370 // Set up output directory
366 let prefix = format!("{}/{}/", cli.outdir, self.name); 371 let prefix = format!("{}/{}/", cli.outdir, self.name);
367 372
368 // Set up algorithms 373 // Set up algorithms

mercurial