Ignore:
Timestamp:
Mar 1, 2007, 10:52:48 PM (16 years ago)
Author:
Jari Häkkinen
Message:

Fixes #194.

File:
1 edited

Legend:

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

    r773 r774  
    177177
    178178    ///
    179     /// @return True if all elements in the matrix is zero, false
    180     /// othwerwise;
    181     ///
    182     bool isnull(void) const;
    183 
    184     ///
    185179    /// @brief Check if the matrix object is a view (sub-matrix) to
    186180    /// another matrix.
     
    189183    ///
    190184    bool isview(void) const;
    191 
    192     ///
    193     /// @return The maximum value of the matrix.
    194     ///
    195     double max(void) const;
    196 
    197     ///
    198     /// @return The minimum value of the matrix.
    199     ///
    200     double min(void) const;
    201 
    202     ///
    203     /// @return The indecies to the element with the minimum and
    204     /// maximum values of the matrix, respectively. The lowest index
    205     /// has precedence (searching in row-major order).
    206     ///
    207     void minmax_index(std::pair<size_t,size_t>& min,
    208                       std::pair<size_t,size_t>& max) const;
    209 
    210     ///
    211     /// The argument is changed into a matrix containing 1's and 0's
    212     /// only. 1 means element in matrix is valid and a zero means
    213     /// element is a NaN.
    214     ///
    215     /// @return true if matrix contains at least one NaN.
    216     ///
    217     bool nan(matrix&) const;
    218185
    219186    /**
     
    266233    */
    267234    void set_row(const size_t row, const vector& vec);
    268 
    269     /**
    270        \brief Exchange the elements of the this and \a other by copying.
    271 
    272        The two matrices must have the same size.
    273 
    274        \throw GSL_error if either index is out of bounds.
    275     */
    276     void swap(matrix& other);
    277235
    278236    /**
     
    453411  };
    454412
    455   ///
    456   /// The output operator for the matrix class.
    457   ///
     413  /**
     414     \brief Check if all elements of the matrix are zero.
     415
     416     \return True if all elements in the matrix is zero, false othwerwise
     417  */
     418  bool isnull(const matrix&);
     419
     420  /**
     421     \brief Get the maximum value in the matrix.
     422
     423     \return The maximum value of the matrix.
     424  */
     425  double max(const matrix&);
     426
     427  /**
     428     \brief Get the minimum value in the matrix.
     429
     430     \return The minimum value of the matrix.
     431  */
     432  double min(const matrix&);
     433
     434  /**
     435     \brief Locate the maximum and minumum element in the matrix.
     436
     437     \return The indecies to the element with the minimum and maximum
     438     values of the matrix, respectively.
     439
     440     \note The lowest index has precedence (searching in row-major
     441     order).
     442  */
     443  void minmax_index(const matrix&,
     444                    std::pair<size_t,size_t>& min,
     445                    std::pair<size_t,size_t>& max);
     446
     447  /**
     448     \brief Create a matrix \a flag indicating NaN's in another matrix
     449     \a templat.
     450
     451     The \a flag matrix is changed to contain 1's and 0's only. A 1
     452     means that the corresponding element in the \a templat matrix is
     453     valid and a zero means that the corresponding element is a NaN.
     454
     455     \note Space for matrix \a flag is reallocated to fit the size of
     456     matrix \a templat if sizes mismatch.
     457
     458     \return True if the \a templat matrix contains at least one NaN.
     459  */
     460  bool nan(const matrix& templat, matrix& flag);
     461
     462  /**
     463     \brief Exchange all elements between the matrices by copying.
     464
     465     The two matrices must have the same size.
     466
     467     \throw GSL_error if either index is out of bounds.
     468  */
     469  void swap(matrix&, matrix&);
     470
     471  /**
     472     \brief The output operator for the matrix class.
     473  */
    458474  std::ostream& operator<< (std::ostream& s, const matrix&);
    459475
Note: See TracChangeset for help on using the changeset viewer.