MCPcopy Create free account
hub / github.com/Open-Quant/openquant / values

Method values

crates/openquant/src/combinatorial_optimization.rs:74–89  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

72 }
73
74 fn values(self) -> Result<Vec<i64>, CombinatorialOptimizationError> {
75 self.validate()?;
76 let mut out = Vec::with_capacity(self.cardinality()?);
77 let mut current = self.lower;
78 while current <= self.upper {
79 out.push(current);
80 current = match current.checked_add(self.step) {
81 Some(next) => next,
82 None => break,
83 };
84 }
85 if out.is_empty() {
86 return Err(CombinatorialOptimizationError::EmptyDomain);
87 }
88 Ok(out)
89 }
90}
91
92#[derive(Debug, Clone, PartialEq, Eq)]

Callers 12

run_flywheel_iterationFunction · 0.80
cluster_kmeans_topFunction · 0.80
improve_clustersFunction · 0.80
cluster_kmeans_baseFunction · 0.80
normalize_usize_mapFunction · 0.80
normalize_string_mapFunction · 0.80
get_shannon_entropyFunction · 0.80
get_plug_in_entropyFunction · 0.80
contains_clusterFunction · 0.80
test_non_linear_effectFunction · 0.80

Calls 3

cardinalityMethod · 0.80
is_emptyMethod · 0.80
validateMethod · 0.45

Tested by 3

contains_clusterFunction · 0.64
test_non_linear_effectFunction · 0.64