Ignore:
Timestamp:
Mar 19, 2007, 6:45:30 PM (15 years ago)
Author:
Peter
Message:

documentation and some minor fixes Fixes #135

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/classifier/MatrixLookup.h

    r767 r826  
    4949  /// to a row and a column in the Kernel, respectively. This design
    5050  /// allow for fast creation of sub-matrices, which is a common
    51   /// operation in most traning/validation procedures.
     51  /// operation in most traning/validation procedures. The views are
     52  /// const views in the sense that they cannot modify underlying
     53  /// matrix.
    5254  ///
    5355  /// A MatrixLookup can be created directly from a matrix or from an
     
    5759  ///
    5860  /// There is a possibility to set the MatrixLookup as owner of the
    59   /// underlying matrix.
     61  /// underlying matrix. This implies that underlying data is deleted
     62  /// in destructor of MatrixLookup, but only if there is no other
     63  /// owner of the underlying data. A reference counter is used to
     64  /// keep track of number of owners. Ownership is copied in copy
     65  /// constructors and assignments.
    6066  ///
    6167  class MatrixLookup : public DataLookup2D
     
    6874    /// Constructor creating a lookup into the entire @a matrix.
    6975    /// @param own if true MatrixLookup owns its underlying @a matrix
     76    ///
     77    /// @note If \a own is true and \a matrix is already owned by some
     78    /// other object, this will lead to \a matrix having multiple
     79    /// owners without the owners being aware of each
     80    /// other. Consequently multiple deletion will occur.
    7081    ///
    7182    /// @note If @a matrix goes out of scope or is deleted, the
     
    115126    /// @brief Copy constructor.
    116127    ///
    117     /// @note If underlying matrix goes out of scope or is deleted, the
    118     /// MatrixLookup becomes invalid and the result of further use is
    119     /// undefined.
    120     ///
    121     MatrixLookup(const MatrixLookup&);
    122 
    123     ///
    124     /// Creates a sub-MatrixLookup. The Lookup is independent of
     128    /// If \a other is owner of underlying data, constructed
     129    /// MatrixLookup will also be set as owner of underlying data.
     130    ///
     131    /// @note If underlying matrix goes out of scope or is deleted, the
     132    /// MatrixLookup becomes invalid and the result of further use is
     133    /// undefined.
     134    ///
     135    MatrixLookup(const MatrixLookup& other);
     136
     137    ///
     138    /// @brief Create a sub-MatrixLookup.
     139    ///
     140    /// The Lookup is independent of
    125141    /// MatrixLookup @a ml. The MatrixLookup is created to look
    126142    /// directly into the underlying matrix to avoid multiple lookups.
    127143    ///
     144    /// If \a ml is owner of underlying data, constructed
     145    /// MatrixLookup will also be set as owner of underlying data.
     146    ///
    128147    /// The @a row and @a column define what sub-matrix to look into,
    129148    /// in other words, the created MatrixLookup will fullfill the
    130     /// following: \f$ MatrixLookup(i,j)=ml(row[i],column[j]) \f$. This
     149    /// following: MatrixLookup(i,j)=ml(row[i],column[j]). This
    131150    /// also means that number of rows in created MatrixLookup is
    132151    /// equal to size of vector @a row, and number of columns is equal
    133152    /// to size of vector @a column.
    134153    ///
     154    /// If \a ml is owner of underlying data, constructed
     155    /// MatrixLookup will also be set as owner of underlying data.
     156    ///
    135157    /// @note If underlying matrix goes out of scope or is deleted, the
    136158    /// MatrixLookup becomes invalid and the result of further use is
     
    148170    /// of the row vectors defined by @a index. This means that the
    149171    /// created MatrixLookup will fullfill:
    150     /// \f$ MatrixLookup(i,j)=ml(i,index[j])\f$
     172    /// MatrixLookup(i,j)=ml(i,index[j])
    151173    ///
    152174    /// If @a row_vectors is false the new MatrixLookup will consist
     
    154176    /// created MatrixLookup will fullfill:
    155177    /// \f$ MatrixLookup(i,j) = ml(index[i],j) \f$
     178    ///
     179    /// If \a ml is owner of underlying data, constructed
     180    /// MatrixLookup will also be set as owner of underlying data.
    156181    ///
    157182    /// @note If underlying matrix goes out of scope or is deleted, the
     
    181206
    182207    ///
    183     /// Destructor.
     208    /// @brief Destructor.
     209    ///
     210    /// If ownership is set true and there is no other owner of
     211    /// underlying data, underlying data is deleted.
    184212    ///
    185213    virtual ~MatrixLookup();
     
    244272    ///
    245273    /// Does only change MatrixLookup not the underlying matrix
    246     /// object. However if the MatrixLookup is owner of its underlying
     274    /// object. However if the MatrixLookup is owner (and the only owner)
     275    /// of its underlying
    247276    /// matrix, that matrix will be deleted here.
    248277    ///
Note: See TracChangeset for help on using the changeset viewer.