[aGrUM] removing ambiguous MultiDimAddressable.begin(). Please use…

[aGrUM] removing ambiguous MultiDimAddressable.begin(). Please use MultiDimAdressable.VariablesSequence().begin()
parent 54cefd67
Pipeline #19028300 failed with stages
in 3 minutes 14 seconds
......@@ -62,7 +62,7 @@ namespace gum {
/** Getters and setters*/
Size nbrDrawnVar() const { return _nbr; }
void setNbrDrawnVar(Size _nbr) { _nbr = _nbr; }
void setNbrDrawnVar(Size nbr) { _nbr = nbr; }
bool isDrawnAtRandom() const { return _atRandom; }
......
......@@ -687,7 +687,7 @@ namespace gum {
* messages and so parents need to be read in order of appearance
* use potentials instead of dag
*/
const Potential< GUM_SCALAR >* parents = &__bnet->cpt(node);
const auto parents = &__bnet->cpt(node).variablesSequence();
std::vector< std::vector< std::vector< GUM_SCALAR > > > msgs_p;
std::vector< std::vector< GUM_SCALAR > > msg_p;
......@@ -892,9 +892,9 @@ namespace gum {
NodeSet const& children = __bnet->children(Y);
NodeSet const& _parents = __bnet->parents(Y);
const Potential< GUM_SCALAR >* parents = &__bnet->cpt(Y);
const auto parents = &__bnet->cpt(Y).variablesSequence();
if (((children.size() + parents->nbrDim() - 1) == 1) &&
if (((children.size() + parents->size() - 1) == 1) &&
(!__infE::_evidence.exists(Y))) {
return;
}
......@@ -1003,8 +1003,8 @@ namespace gum {
for (auto jt = ++parents->begin(), theEnd = parents->end(); jt != theEnd;
++jt) {
if (__bnet->nodeId(**jt) == X) {
pos =
parents->pos(**jt) - 1; // retirer la variable courante de la taille
// retirer la variable courante de la taille
pos = parents->pos(*jt) - 1;
continue;
}
......@@ -1094,9 +1094,9 @@ namespace gum {
const NodeId demanding_child) {
NodeSet const& children = __bnet->children(X);
const Potential< GUM_SCALAR >* parents = &__bnet->cpt(X);
const auto parents = &__bnet->cpt(X).variablesSequence();
if (((children.size() + parents->nbrDim() - 1) == 1) &&
if (((children.size() + parents->size() - 1) == 1) &&
(!__infE::_evidence.exists(X))) {
return;
}
......@@ -1329,7 +1329,7 @@ namespace gum {
NodeSet const& children = __bnet->children(node);
const Potential< GUM_SCALAR >* parents = &__bnet->cpt(node);
auto parents = &__bnet->cpt(node).variablesSequence();
if (_update_l[node]) {
GUM_SCALAR lmin = 1.;
......@@ -1380,7 +1380,7 @@ namespace gum {
} // end of : update_l
if (_update_p[node]) {
if ((parents->nbrDim() - 1) > 0 && !__infE::_evidence.exists(node)) {
if ((parents->size() - 1) > 0 && !__infE::_evidence.exists(node)) {
std::vector< std::vector< std::vector< GUM_SCALAR > > > msgs_p;
std::vector< std::vector< GUM_SCALAR > > msg_p;
std::vector< GUM_SCALAR > distri(2);
......
......@@ -46,11 +46,11 @@ namespace gum {
NodeId c = __src_bn_max.add(var);
if (a != b || a != c /*|| b != c*/)
GUM_ERROR(OperationNotAllowed,
"addNodeWithId : not the same id over all networks : " << a << ", "
<< b
<< ", "
<< c);
GUM_ERROR(
OperationNotAllowed,
"addNodeWithId : not the same id over all networks : " << a << ", " << b
<< ", "
<< c);
return a;
}
......@@ -1586,12 +1586,9 @@ namespace gum {
dest.beginTopologyTransformation();
for (auto node : __current_bn->nodes()) {
for (auto parent_idIt = __current_bn->cpt(node).begin(),
theEnd2 = __current_bn->cpt(node).end();
parent_idIt != theEnd2;
++parent_idIt) {
if (__current_bn->nodeId(**parent_idIt) != node)
dest.addArc(__current_bn->nodeId(**parent_idIt), node);
for (auto parent_idIt : __current_bn->cpt(node).variablesSequence()) {
if (__current_bn->nodeId(*parent_idIt) != node)
dest.addArc(__current_bn->nodeId(*parent_idIt), node);
} // end of : for each parent in order of appearence
} // end of : for each variable
......
......@@ -464,7 +464,7 @@ namespace gum {
// absorbing one
NodeSet separator = __getSeparator(absorbedCliqueId, absorbingCliqueId);
Potential< GUM_SCALAR >* potentialMarginal = 0;
Potential< GUM_SCALAR >* potentialMarginal = 0;
Potential< GUM_SCALAR >* utilityMarginal = 0;
// First we reduce absorbed clique by eleminating clique variables which
......@@ -518,7 +518,7 @@ namespace gum {
CliqueProperties< GUM_SCALAR >* absorbedClique,
NodeSet& separator,
Potential< GUM_SCALAR >*& potentialMarginal,
Potential< GUM_SCALAR >*& utilityMarginal) {
Potential< GUM_SCALAR >*& utilityMarginal) {
Instantiation cliqueInstance(absorbedClique->cliqueInstantiation());
Sequence< const DiscreteVariable* > cliqueRemainVarList(
......@@ -531,7 +531,7 @@ namespace gum {
// Initialisation Operations
// First we create the tables that will result from variable elimination
Potential< GUM_SCALAR >* newPotential = new Potential< GUM_SCALAR >();
Potential< GUM_SCALAR >* newPotential = new Potential< GUM_SCALAR >();
Potential< GUM_SCALAR >* newUtility = new Potential< GUM_SCALAR >();
// Then we need to add all not yet eliminated variables of the clique in
......@@ -676,8 +676,8 @@ namespace gum {
template < typename GUM_SCALAR >
INLINE Potential< GUM_SCALAR >*
InfluenceDiagramInference< GUM_SCALAR >::__makeDummyUtility(NodeId cliqueId) {
Potential< GUM_SCALAR >* ut = new Potential< GUM_SCALAR >(
new MultiDimSparse< GUM_SCALAR >((GUM_SCALAR)0));
Potential< GUM_SCALAR >* ut =
new Potential< GUM_SCALAR >(new MultiDimSparse< GUM_SCALAR >((GUM_SCALAR)0));
__utilityDummies.insert(ut);
for (const auto cliqueNode : __triangulation->junctionTree().clique(cliqueId))
......@@ -745,9 +745,8 @@ namespace gum {
if (removable) __removablePotentialList.insert(&cpt);
for (Sequence< const DiscreteVariable* >::iterator_safe iter = cpt.begin();
iter != cpt.end();
++iter) {
const auto& vars = cpt.variablesSequence();
for (auto iter = vars.beginSafe(); iter != vars.end(); ++iter) {
if (removable && !__allVarsInst.contains(**iter)) try {
__removableVarList.insert(*iter);
} catch (DuplicateElement&) {
......@@ -777,16 +776,14 @@ namespace gum {
if (removable) __removableUtilityList.insert(&ut);
for (Sequence< const DiscreteVariable* >::iterator_safe iter = ut.begin();
iter != ut.end();
++iter) {
if (removable && !__allVarsInst.contains(**iter)) try {
__removableVarList.insert(*iter);
for (auto var : ut.variablesSequence()) {
if (removable && !__allVarsInst.contains(*var)) try {
__removableVarList.insert(var);
} catch (DuplicateElement&) {
// Nothing to do then!
}
addVariable(**iter);
addVariable(*var);
}
}
......@@ -914,5 +911,3 @@ namespace gum {
} /* namespace gum */
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
......@@ -397,7 +397,7 @@ namespace gum {
jnst.add(**idx);
}
jnst.begin();
jnst.setFirst();
auto idx = (std::size_t)0;
while ((!jnst.end()) && idx < array.size()) {
inst.setVals(jnst);
......@@ -2052,7 +2052,7 @@ namespace gum {
jnst.add(**idx);
}
jnst.begin();
jnst.setFirst();
auto idx = (std::size_t)0;
while ((!jnst.end()) && idx < array.size()) {
inst.setVals(jnst);
......
......@@ -81,7 +81,7 @@ namespace gum {
}
Instantiation inst(*(copy->__formulas)), jnst(*__formulas);
for (inst.begin(), jnst.begin(); !(inst.end() || jnst.end());
for (inst.setFirst(), jnst.setFirst(); !(inst.end() || jnst.end());
inst.inc(), jnst.inc()) {
copy->__formulas->set(inst, __formulas->get(jnst));
}
......@@ -108,7 +108,7 @@ namespace gum {
Instantiation inst(__formulas), jnst(src.__formulas);
for (inst.begin(), jnst.begin(); !(inst.end() || jnst.end());
for (inst.setFirst(), jnst.setFirst(); !(inst.end() || jnst.end());
inst.inc(), jnst.inc()) {
__formulas->set(inst, src.__formulas->get(jnst));
}
......@@ -119,7 +119,7 @@ namespace gum {
Instantiation inst(__formulas), jnst(source.cpf());
for (inst.begin(), jnst.begin(); !(inst.end() || jnst.end());
for (inst.setFirst(), jnst.setFirst(); !(inst.end() || jnst.end());
inst.inc(), jnst.inc()) {
auto val = std::to_string(source.cpf().get(jnst));
......@@ -296,7 +296,7 @@ namespace gum {
Instantiation inst(__formulas);
Instantiation jnst(__cpf);
for (inst.begin(), jnst.begin(); !(inst.end() || jnst.end());
for (inst.setFirst(), jnst.setFirst(); !(inst.end() || jnst.end());
inst.inc(), jnst.inc()) {
// With CPT defined using rules, empty values can appear
......@@ -367,7 +367,7 @@ namespace gum {
Instantiation inst(__formulas), jnst(old);
for (inst.begin(), jnst.begin(); !(inst.end() || jnst.end());
for (inst.setFirst(), jnst.setFirst(); !(inst.end() || jnst.end());
inst.inc(), jnst.inc()) {
__formulas->set(inst, old->get(jnst));
}
......@@ -411,7 +411,7 @@ namespace gum {
Instantiation inst(__formulas), jnst(old);
for (inst.begin(), jnst.begin(); !(inst.end() || jnst.end());
for (inst.setFirst(), jnst.setFirst(); !(inst.end() || jnst.end());
inst.inc(), jnst.inc()) {
__formulas->set(inst, old->get(jnst));
}
......
......@@ -106,7 +106,7 @@ namespace gum {
Instantiation inst(*__cpf), jnst(source.cpf());
for (inst.begin(), jnst.begin(); !(inst.end() || jnst.end());
for (inst.setFirst(), jnst.setFirst(); !(inst.end() || jnst.end());
inst.inc(), jnst.inc()) {
__cpf->set(inst, source.cpf().get(jnst));
}
......@@ -262,7 +262,7 @@ namespace gum {
Instantiation inst(__cpf), jnst(old);
for (inst.begin(), jnst.begin(); !(inst.end() || jnst.end());
for (inst.setFirst(), jnst.setFirst(); !(inst.end() || jnst.end());
inst.inc(), jnst.inc()) {
__cpf->set(inst, old->get(jnst));
}
......@@ -301,7 +301,7 @@ namespace gum {
Instantiation inst(__cpf), jnst(old);
for (inst.begin(), jnst.begin(); !(inst.end() || jnst.end());
for (inst.setFirst(), jnst.setFirst(); !(inst.end() || jnst.end());
inst.inc(), jnst.inc()) {
__cpf->set(inst, old->get(jnst));
}
......
......@@ -105,11 +105,10 @@ namespace gum {
static_cast< const PRMAttribute< GUM_SCALAR >* >(__chain->back());
Bijection< const DiscreteVariable*, const DiscreteVariable* > bij;
for (auto iter = old_attr->cpf().begin(); iter != old_attr->cpf().end();
++iter) {
if ((*iter) != &(old_attr->type().variable())) {
for (auto var : old_attr->cpf().variablesSequence()) {
if (var != &(old_attr->type().variable())) {
bij.insert(*iter, *iter);
bij.insert(var, var);
}
}
......
......@@ -322,7 +322,7 @@ namespace gum {
p->add(*(bijection.second(var)));
}
Instantiation inst(attr.cpf()), jnst(*p);
for (inst.begin(), jnst.begin(); !(inst.end() || jnst.end());
for (inst.setFirst(), jnst.setFirst(); !(inst.end() || jnst.end());
inst.inc(), jnst.inc()) {
p->set(jnst, attr.cpf().get(inst));
}
......
......@@ -594,7 +594,7 @@ namespace gum {
}
for (const auto p : pool) {
for (const auto v : *p) {
for (const auto v : p->variablesSequence()) {
try {
target = data.map[data.vars.first(v)];
bij.insert(
......
......@@ -130,7 +130,7 @@ namespace gum {
}
inst.setFirst();
auto currentval = inst.val(0) + 1;
for (jnst.begin(); !jnst.end(); jnst.inc()) {
for (jnst.setFirst(); !jnst.end(); jnst.inc()) {
inst.setVals(jnst);
if (!first) {
str << ", ";
......
......@@ -49,10 +49,8 @@ namespace gum {
static_cast< MultiDimImplementation< GUM_SCALAR >* >(
impl->newFactory()));
for (MultiDimInterface::iterator iter = impl->begin();
iter != impl->end();
++iter)
p->add(*(bij.second(*iter)));
for (auto var : impl->variablesSequence())
p->add(*(bij.second(var)));
} else if (dynamic_cast< const MultiDimBucket< GUM_SCALAR >* >(impl)) {
// This is necessary just to prevent non initialized arrays
const_cast< MultiDimBucket< GUM_SCALAR >* >(
......
......@@ -27,12 +27,12 @@
#ifndef GUM_DAGMODEL_H
#define GUM_DAGMODEL_H
#include <agrum/agrum.h>
#include <agrum/multidim/instantiation.h>
#include <agrum/graphs/DAG.h>
#include <agrum/graphs/undiGraph.h>
#include <agrum/graphicalModels/variableNodeMap.h>
#include <agrum/multidim/instantiation.h>
namespace gum {
......
......@@ -31,6 +31,5 @@
#include <agrum/multidim/implementations/multiDimAdressable.h>
#ifdef GUM_NO_INLINE
#include <agrum/multidim/instantiation_inl.h>
#include <agrum/multidim/implementations/multiDimAdressable_inl.h>
#endif /* GUM_NO_INLINE */
......@@ -171,7 +171,6 @@ namespace gum {
} /* namespace gum */
#ifndef GUM_NO_INLINE
#include <agrum/multidim/instantiation_inl.h>
#include <agrum/multidim/implementations/multiDimAdressable_inl.h>
#endif /* GUM_NO_INLINE */
......
......@@ -37,9 +37,8 @@ namespace gum {
, __name(from.__name) {
GUM_CONS_CPY(MultiDimBijArray);
for (MultiDimInterface::iterator iter = from.begin(); iter != from.end();
++iter) {
MultiDimWithOffset< GUM_SCALAR >::add(**iter);
for (auto var : from.variablesSequence()) {
MultiDimWithOffset< GUM_SCALAR >::add(*var);
}
}
......@@ -51,9 +50,8 @@ namespace gum {
, __name("MultiDimBijArray") {
GUM_CONSTRUCTOR(MultiDimBijArray);
for (MultiDimInterface::iterator iter = array.begin(); iter != array.end();
++iter) {
MultiDimWithOffset< GUM_SCALAR >::add(*(bijection.second(*iter)));
for (auto var : array.variablesSequence()) {
MultiDimWithOffset< GUM_SCALAR >::add(*(bijection.second(var)));
}
}
......@@ -65,9 +63,8 @@ namespace gum {
, __name("MultiDimBijArray") {
GUM_CONSTRUCTOR(MultiDimBijArray);
for (MultiDimInterface::iterator iter = array.begin(); iter != array.end();
++iter) {
MultiDimWithOffset< GUM_SCALAR >::add(*(bijection.second(*iter)));
for (auto var : array.variablesSequence()) {
MultiDimWithOffset< GUM_SCALAR >::add(*(bijection.second(var)));
}
}
......
......@@ -88,9 +88,8 @@ namespace gum {
__multiDims.insert(impl, new Instantiation(*impl));
if (!MultiDimImplementation< GUM_SCALAR >::_isInMultipleChangeMethod()) {
for (MultiDimInterface::iterator iter = impl->begin(); iter != impl->end();
++iter) {
__addVariable(*iter);
for (const auto var : impl->variablesSequence()) {
__addVariable(var);
}
}
......@@ -111,9 +110,8 @@ namespace gum {
__multiDims.erase(impl);
if (!MultiDimImplementation< GUM_SCALAR >::_isInMultipleChangeMethod()) {
for (MultiDimInterface::iterator iter = impl->begin(); iter != impl->end();
++iter) {
__eraseVariable(*iter);
for (auto var : impl->variablesSequence()) {
__eraseVariable(var);
}
}
......@@ -414,10 +412,8 @@ namespace gum {
for ( // HashTableIteratorSafe<const MultiDimContainer<GUM_SCALAR>*,
// Instantiation*>
auto iter = __multiDims.beginSafe(); iter != __multiDims.endSafe(); ++iter) {
for (MultiDimInterface::iterator jter = iter.key()->begin();
jter != iter.key()->end();
++jter) {
__addVariable(*jter);
for (auto var : iter.key()->variablesSequence()) {
__addVariable(var);
}
}
......@@ -481,9 +477,8 @@ namespace gum {
// Creating the table.
__bucket = new MultiDimArray< GUM_SCALAR >();
for (MultiDimInterface::iterator iter = this->begin(); iter != this->end();
++iter) {
__bucket->add(**iter);
for (auto var : this->variablesSequence()) {
__bucket->add(*var);
}
if (!this->_slaves().empty()) {
......
......@@ -61,14 +61,12 @@ namespace gum {
*/
class MultiDimInterface {
public:
/// Alias for Sequence<DiscreteVariable*>::iterator.
typedef Sequence< const DiscreteVariable* >::iterator iterator;
/**
* @brief Class destructor.
* @warning No constructor : interface only.
*/
virtual ~MultiDimInterface(){};
virtual ~MultiDimInterface() {};
// =========================================================================
/// @name Accessors / Modifiers
......@@ -174,44 +172,7 @@ namespace gum {
void swap(const DiscreteVariable& x, const DiscreteVariable& y);
/// @}
// =========================================================================
/// @name Iterators
// =========================================================================
/// @{
/**
* @brief Returns an iterator pointing at the beginning of the Sequence of
* variables.
* @return Returns an iterator pointing at the beginning of the Sequence of
* variables.
*/
iterator begin() const;
/**
* @brief Returns an iterator pointing at the rbeginning of the Sequence
* of variables.
* @return Returns an iterator pointing at the rbeginning of the Sequence
* of variables.
*/
iterator rbegin() const;
/**
* @brief Returns a constant reference on the iterator pointing at the end
* of the Sequence of variables.
* @return Returns a constant reference on the iterator pointing at the end
* of the Sequence of variables.
*/
const iterator& end() const;
/**
* @brief Constant reference on the iterator pointing at the rend of the
* Sequence of variables.
* @return Constant reference on the iterator pointing at the rend of the
* Sequence of variables.
*/
const iterator& rend() const;
/// @}
protected:
/**
* @brief This is called by MultiDimContainer::swap() to proceed with the
......
......@@ -28,33 +28,6 @@
#include <agrum/multidim/implementations/multiDimInterface.h>
namespace gum {
// Iterator pointing at the beginning of the Sequence of variables.
INLINE
MultiDimInterface::iterator MultiDimInterface::begin() const {
return variablesSequence().begin();
}
// Iterator pointing at the rbeginning of the Sequence of variables.
INLINE
MultiDimInterface::iterator MultiDimInterface::rbegin() const {
return variablesSequence().rbegin();
}
// Constant reference on the iterator pointing at the end of the Sequence
// of variables.
INLINE
const MultiDimInterface::iterator& MultiDimInterface::end() const {
return variablesSequence().end();
}
// Constant reference on the iterator pointing at the rend of the Sequence
// of variables.
INLINE
const MultiDimInterface::iterator& MultiDimInterface::rend() const {
return variablesSequence().rend();
}
// Swap two variables in this multidim.
INLINE
void MultiDimInterface::swap(const DiscreteVariable& x,
......
......@@ -24,14 +24,29 @@
* @author Pierre-Henri WUILLEMIN et Christophe GONZALES
*/
#include <agrum/multidim/instantiation.h>
#include <agrum/multidim/implementations/multiDimAdressable.h>
#include <agrum/multidim/instantiation.h>
namespace gum {
// Default constructor
INLINE Instantiation::Instantiation()
: __master(0)
, __overflow(false) {
GUM_CONSTRUCTOR(Instantiation);
}
// destructor
INLINE Instantiation::~Instantiation() {
GUM_DESTRUCTOR(Instantiation);
// unregister the Instantiation from its __master
if (__master) __master->unregisterSlave(*this);
}
void Instantiation::__init(MultiDimAdressable* master) {
// for speed issues
assert(master!=nullptr);
assert(master != nullptr);
const Sequence< const DiscreteVariable* >& v = master->variablesSequence();
__vars.resize(v.size());
......@@ -192,5 +207,5 @@ namespace gum {
} /* namespace gum */
#ifdef GUM_NO_INLINE
// Inline file added in agrum/multidim/multiDimAdressable.cpp
#include <agrum/multidim/instantiation_inl.h>
#endif /* GUM_NO_INLINE */
......@@ -1225,7 +1225,7 @@ namespace gum {
} /* namespace gum */
#ifndef GUM_NO_INLINE
// Inline file included by agrum/multidim/multiDimAdressable.h
#include <agrum/multidim/instantiation_inl.h>
#endif /* GUM_NO_INLINE */
#endif /* GUM_INSTANTIATION_H */
......@@ -196,21 +196,6 @@ namespace gum {
return __vars.pos(&k);
}
// Default constructor
INLINE Instantiation::Instantiation()
: __master(0)
, __overflow(false) {
GUM_CONSTRUCTOR(Instantiation);
}
// destructor
INLINE Instantiation::~Instantiation() {
GUM_DESTRUCTOR(Instantiation);
// unregister the Instantiation from its __master
if (__master) __master->unregisterSlave(*this);
}
// returns the number of vars in the sequence
INLINE Idx Instantiation::nbrDim() const { return __vars.size(); }
......
......@@ -30,8 +30,8 @@
#include <agrum/core/set.h>
#include <agrum/multidim/implementations/multiDimArray.h>
#include <agrum/multidim/implementations/multiDimPartialInstantiation.h>
#include <agrum/multidim/utils/partialInstantiation4MultiDim.h>
#include <agrum/multidim/potential.h>
#include <agrum/multidim/utils/partialInstantiation4MultiDim.h>
#include <agrum/variables/labelizedVariable.h>
namespace gum_tests {
......@@ -123,7 +123,7 @@ namespace gum_tests {
bool equal(const gum::MultiDimImplementation< T* >& t1,
const gum::MultiDimImplementation< T* >& t2) {
if ((t1.nbrDim() == t2.nbrDim()) && (t1.domainSize() == t2.domainSize())) {
for (const auto var : t1)
for (const auto var : t1.variablesSequence())
if (!t2.variablesSequence().exists(var)) return false;
gum::Instantiation i(t1);
......@@ -145,7 +145,7 @@ namespace gum_tests {
template < typename T >
bool equal(const gum::Potential< T* >& t1, const gum::Potential< T* >& t2) {
if ((t1.nbrDim() == t2.nbrDim()) && (t1.domainSize() == t2.domainSize())) {
for (const auto var : t1)
for (const auto var : t1.variablesSequence())
if (!t2.variablesSequence().exists(var)) return false;
gum::Instantiation i(t1);
......
......@@ -123,7 +123,7 @@ namespace gum_tests {
bool equal(const gum::MultiDimImplementation< T* >& t1,
const gum::MultiDimImplementation< T* >& t2) {
if ((t1.nbrDim() == t2.nbrDim()) && (t1.domainSize() == t2.domainSize())) {
for (const auto var : t1)
for (const auto var : t1.variablesSequence())
if (!t2.variablesSequence().exists(var)) return false;
gum::Instantiation i(t1);
......@@ -145,7 +145,7 @@ namespace gum_tests {
template < typename T >
bool equal(const gum::Potential< T* >& t1, const gum::Potential< T* >& t2) {
if ((t1.nbrDim() == t2.nbrDim()) && (t1.domainSize() == t2.domainSize())) {
for (const auto var : t1)
for (const auto var : t1.variablesSequence())
if (!t2.variablesSequence().exists(var)) return false;
gum::Instantiation i(t1);
......
......@@ -1317,7 +1317,7 @@ namespace gum_tests {
try {
auto inst = gum::Instantiation(attr.val()->cpf());
auto sum = 0.0;
for (inst.begin(); !inst.end(); inst.inc()) {
for (inst.setFirst(); !inst.end(); inst.inc()) {
sum += attr.val()->cpf()[inst];
}
gum::Size card = 1;
......@@ -1402,7 +1402,7 @@ namespace gum_tests {
gum::Instantiation inst(hasInk.cpf());
std::vector< double > values;