|
|
@ -16,8 +16,8 @@ use std::collections::BTreeSet; |
|
|
|
|
|
|
|
|
|
|
|
fn uniform_parameters_generator_right_densities_ctmp() -> (CtbnNetwork, Dataset) { |
|
|
|
fn uniform_parameters_generator_right_densities_ctmp() -> (CtbnNetwork, Dataset) { |
|
|
|
let mut net = CtbnNetwork::new(); |
|
|
|
let mut net = CtbnNetwork::new(); |
|
|
|
let nodes_cardinality = 3; |
|
|
|
let nodes_cardinality = 5; |
|
|
|
let domain_cardinality = 2; |
|
|
|
let domain_cardinality = 3; |
|
|
|
for node in 0..nodes_cardinality { |
|
|
|
for node in 0..nodes_cardinality { |
|
|
|
// Create the domain for a discrete node
|
|
|
|
// Create the domain for a discrete node
|
|
|
|
let mut domain = BTreeSet::new(); |
|
|
|
let mut domain = BTreeSet::new(); |
|
|
@ -45,13 +45,12 @@ fn uniform_parameters_generator_right_densities_ctmp() -> (CtbnNetwork, Dataset) |
|
|
|
// Generate CIMs with uniformly distributed parameters.
|
|
|
|
// Generate CIMs with uniformly distributed parameters.
|
|
|
|
cim_generator.generate_parameters(&mut net); |
|
|
|
cim_generator.generate_parameters(&mut net); |
|
|
|
|
|
|
|
|
|
|
|
let dataset = trajectory_generator(&net, 3, 20.0, Some(30230423)); |
|
|
|
let dataset = trajectory_generator(&net, 300, 200.0, Some(30230423)); |
|
|
|
|
|
|
|
|
|
|
|
return (net, dataset); |
|
|
|
return (net, dataset); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
fn main() { |
|
|
|
fn main() { |
|
|
|
println!("Hello, world!"); |
|
|
|
|
|
|
|
let mut data = json::JsonValue::new_array(); |
|
|
|
let mut data = json::JsonValue::new_array(); |
|
|
|
data.push(json::JsonValue::new_object()).unwrap(); |
|
|
|
data.push(json::JsonValue::new_object()).unwrap(); |
|
|
|
data[0]["dyn.str"] = json::JsonValue::new_array(); |
|
|
|
data[0]["dyn.str"] = json::JsonValue::new_array(); |
|
|
|