Changeset 1068


Ignore:
Timestamp:
Feb 11, 2008, 8:29:36 PM (13 years ago)
Author:
Peter
Message:

some documentation and vector::operator=(const VectorBase?&)

Location:
trunk/yat/utility
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/matrix.h

    r1066 r1068  
    353353       \brief Transpose the matrix.
    354354
     355       \note Invalidates view of matrix, unless matrix is square.
     356
    355357       \throw GSL_error if memory allocation fails for the new
    356358       transposed matrix.
  • trunk/yat/utility/vector.cc

    r1036 r1068  
    180180
    181181
    182   /*
    183   //Peter use swap idiom
    184   const VectorBase& vector::operator=( const VectorBase& other )
    185   {
    186     if (!other.size())
    187       vec_=NULL;
    188     else  {   
    189       if (size()!=other.size())
    190         resize(other.size(),0.0);
    191       gsl_vector_memcpy(vec_,other.gsl_vector_p());
    192     }
    193     return *this;
     182  const vector& vector::operator=( const VectorBase& other )
     183  {
     184    return assign(other);
    194185  }
    195   */
     186
    196187
    197188  const vector& vector::operator=( const vector& other )
     
    200191  }
    201192
    202   /* 
    203   const VectorBase& vector::assign(VectorBase& other)
    204   {
    205     assign(other);
    206   }
    207   */
    208193
    209194  const vector& vector::assign(const VectorBase& other)
  • trunk/yat/utility/vector.h

    r1058 r1068  
    118118       \brief The assignment operator.
    119119
     120       \note Invalidates views of vector.
     121
    120122       \return A const reference to the resulting vector.
    121123    */
    122     //const VectorBase& operator=(const VectorBase&);
    123124    const vector& operator=(const vector&);
     125
     126    /**
     127       \brief The assignment operator.
     128
     129       \note Invalidates views of vector.
     130
     131       \return A const reference to the resulting vector.
     132    */
     133    const vector& operator=(const VectorBase&);
    124134
    125135  private:
Note: See TracChangeset for help on using the changeset viewer.