IntegerArray::IntegerArray (const IntegerArray& v) { (*this) .allocateDataSpace(v.order()) ; (*this) = v; }
LongInt l1(const IntegerArray& v) { LongInt value = 0; const LongInt d = v.order(); for(LongInt i=0; i<d; i++) { value += v(i); } return value; }
LongInt maxEntryOf(const IntegerArray& v) { const LongInt d = v.order(); LongInt value = v(0); for(LongInt mu=1; mu<d; mu++) { const LongInt& v_mu = v(mu); if(value<v_mu) { value = v_mu; } } return value; }
bool IntegerArray::operator != (const IntegerArray& a) const { const LongInt n1 = (*this).order(); const LongInt n2 = a.order(); bool value = false; if(n1==n2) { for(LongInt mu=0; mu<n1 && value==false; mu++) { if((*this)(mu)!=a(mu)) { value = true; } } } else { value = true; } return value; }