forked from StudioInfinity/dyna3
Improve naming in realization output structures
This commit is contained in:
parent
477d6a5064
commit
f1865f85a1
7 changed files with 53 additions and 47 deletions
|
@ -1,7 +1,12 @@
|
|||
#[path = "common/print.rs"]
|
||||
mod print;
|
||||
|
||||
use dyna3::engine::{realize_gram, sphere, ConstraintProblem, Realization};
|
||||
use dyna3::engine::{
|
||||
realize_gram,
|
||||
sphere,
|
||||
ConfigNeighborhood,
|
||||
ConstraintProblem
|
||||
};
|
||||
|
||||
fn main() {
|
||||
let mut problem = ConstraintProblem::from_guess({
|
||||
|
@ -17,13 +22,13 @@ fn main() {
|
|||
problem.gram.push_sym(j, k, if j == k { 1.0 } else { -1.0 });
|
||||
}
|
||||
}
|
||||
let realization_result = realize_gram(
|
||||
let realization = realize_gram(
|
||||
&problem, 1.0e-12, 0.5, 0.9, 1.1, 200, 110
|
||||
);
|
||||
print::title("Three spheres");
|
||||
print::realization_diagnostics(&realization_result);
|
||||
if let Ok(Realization{ config, .. }) = realization_result.result {
|
||||
print::realization_diagnostics(&realization);
|
||||
if let Ok(ConfigNeighborhood{ config, .. }) = realization.result {
|
||||
print::gram_matrix(&config);
|
||||
}
|
||||
print::loss_history(&realization_result.history);
|
||||
print::loss_history(&realization.history);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue