diff --git a/cpp/LinearFactor.cpp b/cpp/LinearFactor.cpp index 52bc9a450..e81eb2501 100644 --- a/cpp/LinearFactor.cpp +++ b/cpp/LinearFactor.cpp @@ -137,33 +137,33 @@ pair LinearFactor::matrix(const Ordering& ordering) const { } /* ************************************************************************* */ -void LinearFactor::append_factor(LinearFactor::shared_ptr f, const size_t m, const size_t pos) -{ - // iterate over all matrices from the factor f - LinearFactor::const_iterator it = f->begin(); - for(; it != f->end(); it++) { - string j = it->first; - Matrix A = it->second; +void LinearFactor::append_factor(LinearFactor::shared_ptr f, const size_t m, + const size_t pos) { + // iterate over all matrices from the factor f + LinearFactor::const_iterator it = f->begin(); + for (; it != f->end(); it++) { + string j = it->first; + Matrix A = it->second; - // find rows and columns - const size_t mrhs = A.size1(), n = A.size2(); + // find rows and columns + const size_t mrhs = A.size1(), n = A.size2(); - // find the corresponding matrix among As - const_iterator mine = As.find(j); - const bool exists = mine!=As.end(); + // find the corresponding matrix among As + const_iterator mine = As.find(j); + const bool exists = mine != As.end(); - // create the matrix or use existing - Matrix Anew = exists ? mine->second : zeros(m,n); + // create the matrix or use existing + Matrix Anew = exists ? mine->second : zeros(m, n); - // copy the values in the existing matrix - for (size_t i=0;i