Changeset 596


Ignore:
Timestamp:
Aug 28, 2006, 1:20:52 PM (15 years ago)
Author:
Peter
Message:

some doc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/c++_tools/classifier/MatrixLookupWeighted.h

    r595 r596  
    1515
    1616  ///
    17   /// MatrixLookups can be used to create lookups/views into matrices
    18   /// in a more general way than the views supported in the matrix
    19   /// class. The object does not contain any data, but only a pointer
    20   /// to a matrix and row and columns incices defining which
    21   /// sub-matrix to look into.  Each row and each column corresponds
    22   /// to a row and a column in the Kernel, respectively. This design
    23   /// allow for fast creation of sub-matrices, which is a common
    24   /// operation in most traning/validation procedures.
     17  /// A MatrixLookupWeighted is very similar to a MatrixLookup, but
     18  /// contains a pointer to a weight matrix as well meeaning each data
     19  /// element is associated to weight.
    2520  ///
    2621  /// A MatrixLookupWeighted can be created directly from a matrix or from an
     
    2924  /// avoid multiple lookups.
    3025  ///
    31   /// There is a possibility to set the MatrixLookupWeighted as owner of the
    32   /// underlying matrix. In that case the underlying matrix will be
    33   /// destroyed in the destructor. Consequently, the underlying matrix
    34   /// must have been dynamically allocated and no other MatrixLookupWeighted
    35   /// can own the Kernel.
     26  /// There is a possibility to set the MatrixLookupWeighted as owner
     27  /// of the underlying matrices (data and weight). In that case the
     28  /// underlying matrix will be destroyed in the
     29  /// destructor. Consequently, the underlying matricis must have been
     30  /// dynamically allocated and no other MatrixLookupWeighted can own
     31  /// the matrices.
    3632  ///
    3733  /// @todo add on weight part
     
    4541    /// Constructor creating a lookup into the entire @a matrix.
    4642    ///
    47     /// @note If @a matrix goes out of scope or is deleted, the
    48     /// MatrixLookupWeighted becomes invalid and the result of further use is
    49     /// undefined.
     43    /// @note If @a matrix or @a weights goes out of scope or is
     44    /// deleted, the MatrixLookupWeighted becomes invalid and the
     45    /// result of further use is undefined.
    5046    ///
    5147    MatrixLookupWeighted(const gslapi::matrix& matrix,
     
    5551    /// Constructor creating a lookup into a sub-matrix of @a matrix.
    5652    /// The @a row and @a column define what sub-matrix to look into,
    57     /// in other words, the created MatrixLookupWeighted will fullfill the
    58     /// following: \f$ MatrixLookupWeighted(i,j)=matrix(row[i],column[j])
    59     /// \f$. This also means that number of rows in created
    60     /// MatrixLookupWeighted is equal to size of vector @a row, and number of
    61     /// columns is equal to size of vector @a column.
    62     ///
    63     /// @note If @a matrix goes out of scope or is deleted, the
    64     /// MatrixLookupWeighted becomes invalid and the result of further use is
    65     /// undefined.
    66     ///
    67     MatrixLookupWeighted(const gslapi::matrix& matrix, const gslapi::matrix& weights,
    68                  const std::vector<size_t>& row,
    69                  const std::vector<size_t>& column);
     53    /// in other words, the created MatrixLookupWeighted will fullfill
     54    /// the following: \f$
     55    /// MatrixLookupWeighted(i,j)=matrix(row[i],column[j])
     56    /// weights(row[i],column[j])\f$. This also means that number of
     57    /// rows in created MatrixLookupWeighted is equal to size of
     58    /// vector @a row, and number of columns is equal to size of
     59    /// vector @a column.
     60    ///
     61    /// @note If @a matrix or @a weights goes out of scope or is deleted, the
     62    /// MatrixLookupWeighted becomes invalid and the result of further use is
     63    /// undefined.
     64    ///
     65    MatrixLookupWeighted(const gslapi::matrix& matrix,
     66                         const gslapi::matrix& weights,
     67                         const std::vector<size_t>& row,
     68                         const std::vector<size_t>& column);
    7069
    7170    ///
    7271    /// Constructor creating a lookup into a sub-matrix of @matrix.
    7372    ///
    74     /// If @a row_vectors is true the new MatrixLookupWeighted will be consist
    75     /// of the row vectors defined by @a index. This means that the
    76     /// created MatrixLookupWeighted will fullfill:
    77     /// \f$ MatrixLookupWeighted(i,j)=matrix(i,index[j]) \f$
     73    /// If @a row_vectors is true the new MatrixLookupWeighted will be
     74    /// consist of the row vectors defined by @a index. This means
     75    /// that the created MatrixLookupWeighted will fullfill: \f$
     76    /// MatrixLookupWeighted(i,j)=matrix(i,index[j])*weights(i,index[j])
     77    /// \f$
    7878    ///
    7979    /// If @a row_vectors is false the new MatrixLookupWeighted will be consist
     
    8282    /// \f$ MatrixLookupWeighted(i,j)=matrix(index[i],j) \f$
    8383    ///
    84     /// @note If @a matrix goes out of scope or is deleted, the
    85     /// MatrixLookupWeighted becomes invalid and the result of further use is
    86     /// undefined.
     84    /// @note If @a matrix or @a weights goes out of scope or is
     85    /// deleted, the MatrixLookupWeighted becomes invalid and the
     86    /// result of further use is undefined.
    8787    ///
    8888    MatrixLookupWeighted(const gslapi::matrix& matrix,
Note: See TracChangeset for help on using the changeset viewer.