inline bool lexicographical_equal(const SetType& left, const SetType& right) { if(&left == &right) return true; else return left.iterative_size() == right.iterative_size() && std::equal(left.begin(), left.end(), right.begin()); }
void buildSetNames(const SetType & setData,std::vector<std::string> & names) { // pull out all names for this set for(typename SetType::const_iterator itr=setData.begin();itr!=setData.end();++itr) { Ioss::GroupingEntity * entity = *itr; names.push_back(entity->name()); } }
void GMStandard::multiply ( const SetType & rowSet, const SetType & columnSet, NICE::Vector & y, const NICE::Vector & x) const { if ( x.size() != columnSet.size() ) fthrow(Exception, "Size of the column set is different from the size of the given input vector: " << columnSet.size() << " vs " << x.size()); y.resize( rowSet.size() ); // memory inefficient Matrix Asub ( rowSet.size(), columnSet.size() ); int ii = 0; for ( SetType::const_iterator i = rowSet.begin(); i != rowSet.end(); i++,ii++ ) { int jj = 0; for ( SetType::const_iterator j = columnSet.begin(); j != columnSet.end(); j++,jj++ ) Asub ( ii, jj ) = A( *i, *j ); } y.multiply ( Asub, x ); }