[agrum] minor typo found by clang-tidy

parent 16adc459
......@@ -30,6 +30,8 @@ from .utils import trace, setifyString, critic
def getCmake(current, target):
line = cfg.cmake + " ../.." # we are in build/[release|target]
line += " -DCMAKE_EXPORT_COMPILE_COMMANDS=ON " # for clang-tidy
if current["mode"] == "release":
line += " -DCMAKE_BUILD_TYPE=RELEASE"
else:
......@@ -173,7 +175,7 @@ def getPost(current, target):
line = 'copy /Y "wrappers\pyAgrum\Release\_pyAgrum.pyd" "wrappers\pyAgrum\." & ' + cfg.python + " ..\\..\\wrappers\\pyAgrum\\testunits\\"+gumTest
else:
line = cfg.python + " ../../wrappers/pyAgrum/testunits/"+gumTest
line+=" "+current['mode']
line+=" "+current['mode']
return line, True
return "", False
......
......@@ -400,14 +400,12 @@ namespace gum {
// update the conditional distributions of head and tail
Set< const DiscreteVariable* > del_vars;
del_vars << &(variable(tail));
Potential< GUM_SCALAR > new_cpt_head = prod.margSumOut(del_vars);
Potential< GUM_SCALAR >& cpt_head =
const_cast< Potential< GUM_SCALAR >& >(cpt(head));
Potential< GUM_SCALAR > new_cpt_head = prod.margSumOut(del_vars);
auto& cpt_head = const_cast< Potential< GUM_SCALAR >& >(cpt(head));
cpt_head = std::move(new_cpt_head);
Potential< GUM_SCALAR > new_cpt_tail{prod / cpt_head};
Potential< GUM_SCALAR >& cpt_tail =
const_cast< Potential< GUM_SCALAR >& >(cpt(tail));
Potential< GUM_SCALAR > new_cpt_tail{prod / cpt_head};
auto& cpt_tail = const_cast< Potential< GUM_SCALAR >& >(cpt(tail));
cpt_tail = std::move(new_cpt_tail);
}
......@@ -549,7 +547,7 @@ namespace gum {
void BayesNet< GUM_SCALAR >::addWeightedArc(NodeId tail,
NodeId head,
GUM_SCALAR causalWeight) {
const MultiDimICIModel< GUM_SCALAR >* CImodel =
auto* CImodel =
dynamic_cast< const MultiDimICIModel< GUM_SCALAR >* >(cpt(head).content());
if (CImodel != 0) {
......
......@@ -67,7 +67,7 @@ namespace gum {
* Default constructor.
*/
IBayesNet();
IBayesNet(std::string name);
explicit IBayesNet(std::string name);
/**
* Destructor.
......@@ -159,10 +159,10 @@ namespace gum {
*
* @return true if the src and this are equal.
*/
bool operator==(const IBayesNet< GUM_SCALAR >& src) const;
bool operator==(const IBayesNet< GUM_SCALAR >& from) const;
/// @return Returns false if the src and this are equal.
bool operator!=(const IBayesNet< GUM_SCALAR >& src) const;
bool operator!=(const IBayesNet< GUM_SCALAR >& from) const;
/**
* Returns the dimension (the number of free parameters) in this bayes net.
......@@ -225,7 +225,7 @@ namespace gum {
*
* i.e. P(targets| soids)=P(targets|@return)
*/
NodeSet minimalCondSet(const NodeSet& target, const NodeSet& soids) const;
NodeSet minimalCondSet(const NodeSet& targets, const NodeSet& soids) const;
private:
void __minimalCondSetVisitUp(NodeId node,
......@@ -248,7 +248,7 @@ namespace gum {
/// Prints map's DAG in output using the Graphviz-dot format.
template < typename GUM_SCALAR >
std::ostream& operator<<(std::ostream& output,
const IBayesNet< GUM_SCALAR >& map);
const IBayesNet< GUM_SCALAR >& bn);
} /* namespace gum */
......
......@@ -10297,14 +10297,14 @@ class IBayesNet_double(DAGmodel):
return _pyAgrum.IBayesNet_double_log2JointProbability(self, i)
def __eq__(self, src: 'IBayesNet_double') -> "bool":
"""__eq__(self, src) -> bool"""
return _pyAgrum.IBayesNet_double___eq__(self, src)
def __eq__(self, arg2: 'IBayesNet_double') -> "bool":
"""__eq__(self, arg2) -> bool"""
return _pyAgrum.IBayesNet_double___eq__(self, arg2)
def __ne__(self, src: 'IBayesNet_double') -> "bool":
"""__ne__(self, src) -> bool"""
return _pyAgrum.IBayesNet_double___ne__(self, src)
def __ne__(self, arg2: 'IBayesNet_double') -> "bool":
"""__ne__(self, arg2) -> bool"""
return _pyAgrum.IBayesNet_double___ne__(self, arg2)
def dim(self) -> "gum::Size":
......@@ -10434,7 +10434,7 @@ class IBayesNet_double(DAGmodel):
def minimalCondSet(self, *args) -> "PyObject *":
"""
minimalCondSet(self, target, soids) -> gum::NodeSet
minimalCondSet(self, target, soids) -> gum::NodeSet
minimalCondSet(self, targets, soids) -> gum::NodeSet
minimalCondSet(self, target, list) -> PyObject
minimalCondSet(self, targets, list) -> PyObject *
......
......@@ -118110,8 +118110,8 @@ static PyMethodDef SwigMethods[] = {
"a variable not present in the instantiation is assumed to be instantiated to 0\n"
"\n"
""},
{ (char *)"IBayesNet_double___eq__", _wrap_IBayesNet_double___eq__, METH_VARARGS, (char *)"IBayesNet_double___eq__(self, src) -> bool"},
{ (char *)"IBayesNet_double___ne__", _wrap_IBayesNet_double___ne__, METH_VARARGS, (char *)"IBayesNet_double___ne__(self, src) -> bool"},
{ (char *)"IBayesNet_double___eq__", _wrap_IBayesNet_double___eq__, METH_VARARGS, (char *)"IBayesNet_double___eq__(self, arg3) -> bool"},
{ (char *)"IBayesNet_double___ne__", _wrap_IBayesNet_double___ne__, METH_VARARGS, (char *)"IBayesNet_double___ne__(self, arg3) -> bool"},
{ (char *)"IBayesNet_double_dim", _wrap_IBayesNet_double_dim, METH_VARARGS, (char *)"\n"
"IBayesNet_double_dim(self) -> gum::Size\n"
"\n"
......@@ -118198,7 +118198,7 @@ static PyMethodDef SwigMethods[] = {
""},
{ (char *)"IBayesNet_double_minimalCondSet", _wrap_IBayesNet_double_minimalCondSet, METH_VARARGS, (char *)"\n"
"minimalCondSet(target, soids) -> gum::NodeSet\n"
"minimalCondSet(target, soids) -> gum::NodeSet\n"
"minimalCondSet(targets, soids) -> gum::NodeSet\n"
"minimalCondSet(target, list) -> PyObject\n"
"IBayesNet_double_minimalCondSet(self, targets, list) -> PyObject *\n"
"\n"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment