Changeset 1405 in Sophya for trunk/SophyaLib/HiStats/ntuple.cc


Ignore:
Timestamp:
Feb 15, 2001, 6:58:16 PM (25 years ago)
Author:
ansari
Message:

Ajout documentation - Reza 15/2/2001

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaLib/HiStats/ntuple.cc

    r1371 r1405  
    1616   Simple NTuple class (a Table or 2-D data set) with floating value
    1717   columns.
     18   \sa SOPHYA::ObjFileIO<NTuple>
     19
     20   \code
     21   #include "ntuple.h"
     22   // ...
     23   char * names[3] = {"XPos", "YPos", "Val"};
     24   // NTuple (Table) creation with 3 columns
     25   NTuple  nt(3, names);
     26   // Filling the NTuple
     27   r_4 x[3];
     28   for(int i=0; i<63; i++) {
     29     x[0] = (i%9)-4.;  x[1] = (i/9)-3.;  x[2] = x[0]*x[0]+x[1]*x[1];
     30     nt.Fill(x);
     31   }
     32   // Printing table info
     33   cout << nt ;
     34   // Saving object into a PPF file
     35   POutPersist po("nt.ppf");
     36   po << nt ;
     37   \endcode
    1838*/
    1939
     
    3252
    3353/* --Methode-- */
     54//! Default constructor
    3455//++
    3556NTuple::NTuple()
     
    4667
    4768
     69//! Constructor with specification of number of columns and column name
     70/*!
     71  \param nvar : Number of columns in the table
     72  \param noms : Array of column names (length(name) < 8 characters)
     73  \param blk : Optional argument specifying number of table lines
     74  in a given data block
     75 */
    4876//++
    4977NTuple::NTuple(int nvar, char** noms, int blk)
     
    77105}
    78106
     107//! Copy constructor - Copies the table definition and associated data
    79108//                                       cmv 8/10/99
    80109//++
     
    108137
    109138/* --Methode-- */
     139//! Constructor with table initialized from a PPF file
    110140//++
    111141NTuple::NTuple(char *flnm)
     
    131161
    132162/* --Methode-- */
     163//! Clear the data table definition and deletes the associated data
    133164void NTuple::Clean()
    134165{
     
    149180
    150181/* --Methode--        cmv 08/10/99 */
     182//! = operator, copies the data table definition and its contents
    151183//++
    152184NTuple& NTuple::operator = (const NTuple& NT)
     
    181213
    182214/* --Methode-- */
     215//! Adds an entry (a line) to the table
     216/*!
     217  \param x : content of the line to be appended to the table
     218 */
    183219//++
    184220void  NTuple::Fill(r_4* x)
     
    317353
    318354/* --Methode-- */
     355//! Prints table definition and number of entries
    319356//++
    320357void  NTuple::Show(ostream& os)  const
     
    339376
    340377/* --Methode-- */
     378//! Fills the table, reading lines from an ascii file
     379/*!
     380  \param fn : file name
     381  \param defval : default value for empty cells in the ascii file
     382 */
    341383//++
    342384int  NTuple::FillFromASCIIFile(string const& fn, float defval)
     
    544586}
    545587
     588/*!
     589   \class SOPHYA::ObjFileIO<NTuple>
     590   \ingroup HiStats
     591   Persistence (serialisation) handler for class NTuple
     592*/
    546593
    547594/* --Methode-- */
Note: See TracChangeset for help on using the changeset viewer.