コード例 #1
0
IntegerArray::IntegerArray (const IntegerArray& v)
 {
    (*this)
     .allocateDataSpace(v.order())
    ;
    
    (*this) = v; 
 }
コード例 #2
0
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;
 }
コード例 #3
0
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;
 }
コード例 #4
0
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;
 }