|
|
|
@ -325,7 +325,9 @@ impl RandomParametersGenerator for UniformParametersGenerator { |
|
|
|
|
.iter() |
|
|
|
|
.map(|x| net.get_node(*x).get_reserved_space_as_parent()) |
|
|
|
|
.product(); |
|
|
|
|
let node_domain_cardinality = net.get_node(node).get_reserved_space_as_parent(); |
|
|
|
|
match &mut net.get_node_mut(node) { |
|
|
|
|
params::Params::DiscreteStatesContinousTime(param) => { |
|
|
|
|
let node_domain_cardinality = param.get_reserved_space_as_parent(); |
|
|
|
|
let mut cim = Array3::<f64>::from_shape_fn( |
|
|
|
|
( |
|
|
|
|
parent_set_state_space_cardinality, |
|
|
|
@ -341,13 +343,11 @@ impl RandomParametersGenerator for UniformParametersGenerator { |
|
|
|
|
self.rng.gen_range(self.interval.clone()) |
|
|
|
|
}); |
|
|
|
|
x.mul_assign(&diag.clone().insert_axis(Axis(1))); |
|
|
|
|
// Recomputing the diagonal in order to reduce the issues caused by the loss of
|
|
|
|
|
// precision when validating the parameters.
|
|
|
|
|
// Recomputing the diagonal in order to reduce the issues caused by the
|
|
|
|
|
// loss of precision when validating the parameters.
|
|
|
|
|
let diag_sum = -x.sum_axis(Axis(1)); |
|
|
|
|
x.diag_mut().assign(&diag_sum) |
|
|
|
|
}); |
|
|
|
|
match &mut net.get_node_mut(node) { |
|
|
|
|
params::Params::DiscreteStatesContinousTime(param) => { |
|
|
|
|
param.set_cim_unchecked(cim); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|