src/main.rs

changeset 9
0fa3ac0c248b
parent 7
8979a6638424
child 11
933242e0f3b8
equal deleted inserted replaced
8:17d71ca4ce84 9:0fa3ac0c248b
26 use zero::ZeroFn; 26 use zero::ZeroFn;
27 use alg_tools::mapping::Sum; 27 use alg_tools::mapping::Sum;
28 use alg_tools::iterate::{AlgIteratorOptions, Verbose}; 28 use alg_tools::iterate::{AlgIteratorOptions, Verbose};
29 29
30 let points = [ 30 let points = [
31 //OnCube::new(F1, Loc([0.5, 0.5])),
32 //OnCube::new(F2, Loc([0.5, 0.5])),
33 //OnCube::new(F4, Loc([0.1, 0.1])),
31 OnCube::new(F1, Loc([0.5, 0.5])), 34 OnCube::new(F1, Loc([0.5, 0.5])),
35 OnCube::new(F3, Loc([0.5, 0.5])),
32 OnCube::new(F2, Loc([0.5, 0.5])), 36 OnCube::new(F2, Loc([0.5, 0.5])),
33 OnCube::new(F4, Loc([0.1, 0.1])),
34 ]; 37 ];
35 38
36 //let x = points[0].clone(); 39 //let x = points[0].clone();
37 let x = OnCube::new(F6, Loc([0.5, 0.5])); 40 // OnCube::new(F3, Loc([0.5, 0.5])); goes to opposite side
41 let x = OnCube::new(F3, Loc([0.5, 0.4]));
38 let f = Sum::new(points.into_iter().map(DistToSquaredDiv2)); 42 let f = Sum::new(points.into_iter().map(DistToSquaredDiv2));
39 let g = ZeroFn::new(); 43 let g = ZeroFn::new();
40 let τ = 0.1; 44 let τ = 0.1;
41 let iter = AlgIteratorOptions{ 45 let iter = AlgIteratorOptions{
42 max_iter : 100, 46 max_iter : 100,

mercurial