PLearn 0.1
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Static Protected Member Functions | Private Types | Private Member Functions
PLearn::TransposeVMatrix Class Reference

#include <TransposeVMatrix.h>

Inheritance diagram for PLearn::TransposeVMatrix:
Inheritance graph
[legend]
Collaboration diagram for PLearn::TransposeVMatrix:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 TransposeVMatrix ()
 Default constructor.
 TransposeVMatrix (const VMat &the_source)
 Convenience constructor.
virtual void build ()
 Simply calls inherited::build() then build_().
virtual void makeDeepCopyFromShallowCopy (CopiesMap &copies)
 Transforms a shallow copy into a deep copy.
virtual string classname () const
virtual OptionListgetOptionList () const
virtual OptionMapgetOptionMap () const
virtual RemoteMethodMapgetRemoteMethodMap () const
virtual TransposeVMatrixdeepCopy (CopiesMap &copies) const

Static Public Member Functions

static string _classname_ ()
 Declares name and deepCopy methods.
static OptionList_getOptionList_ ()
static RemoteMethodMap_getRemoteMethodMap_ ()
static Object_new_instance_for_typemap_ ()
static bool _isa_ (const Object *o)
static void _static_initialize_ ()
static const PPathdeclaringFile ()

Static Public Attributes

static StaticInitializer _static_initializer_

Protected Member Functions

virtual void getNewRow (int i, const Vec &v) const
 Fill the vector 'v' with the content of the i-th row.
virtual void getColumn (int j, Vec v) const
 Copies column i into v (which must have appropriate length equal to the VMat's length).
virtual void getMat (int i, int j, Mat m) const
 Copies the submatrix starting at i,j into m (which must have appropriate length and width).

Static Protected Member Functions

static void declareOptions (OptionList &ol)
 Declares this class' options.

Private Types

typedef SourceVMatrix inherited

Private Member Functions

void build_ ()
 This does the actual building.

Detailed Description

Definition at line 52 of file TransposeVMatrix.h.


Member Typedef Documentation

Reimplemented from PLearn::SourceVMatrix.

Definition at line 57 of file TransposeVMatrix.h.


Constructor & Destructor Documentation

PLearn::TransposeVMatrix::TransposeVMatrix ( )

Default constructor.

Definition at line 52 of file TransposeVMatrix.cc.

{}
PLearn::TransposeVMatrix::TransposeVMatrix ( const VMat the_source)

Convenience constructor.

Definition at line 55 of file TransposeVMatrix.cc.

{
    source = the_source;
    build();
}

Member Function Documentation

string PLearn::TransposeVMatrix::_classname_ ( ) [static]

Declares name and deepCopy methods.

Reimplemented from PLearn::SourceVMatrix.

Definition at line 64 of file TransposeVMatrix.cc.

OptionList & PLearn::TransposeVMatrix::_getOptionList_ ( ) [static]

Reimplemented from PLearn::SourceVMatrix.

Definition at line 64 of file TransposeVMatrix.cc.

RemoteMethodMap & PLearn::TransposeVMatrix::_getRemoteMethodMap_ ( ) [static]

Reimplemented from PLearn::SourceVMatrix.

Definition at line 64 of file TransposeVMatrix.cc.

bool PLearn::TransposeVMatrix::_isa_ ( const Object o) [static]

Reimplemented from PLearn::SourceVMatrix.

Definition at line 64 of file TransposeVMatrix.cc.

Object * PLearn::TransposeVMatrix::_new_instance_for_typemap_ ( ) [static]

Reimplemented from PLearn::SourceVMatrix.

Definition at line 64 of file TransposeVMatrix.cc.

StaticInitializer TransposeVMatrix::_static_initializer_ & PLearn::TransposeVMatrix::_static_initialize_ ( ) [static]

Reimplemented from PLearn::SourceVMatrix.

Definition at line 64 of file TransposeVMatrix.cc.

void PLearn::TransposeVMatrix::build ( ) [virtual]

Simply calls inherited::build() then build_().

Reimplemented from PLearn::SourceVMatrix.

Definition at line 89 of file TransposeVMatrix.cc.

{
    // ### Nothing to add here, simply calls build_
    inherited::build();
    build_();
}
void PLearn::TransposeVMatrix::build_ ( ) [private]

This does the actual building.

Reimplemented from PLearn::SourceVMatrix.

Definition at line 99 of file TransposeVMatrix.cc.

{
    if (source) {
        width_ = source->length();
        length_ = source->width();
        if (inputsize_ < 0)
            inputsize_ = width_;
        if (targetsize_ < 0)
            targetsize_ = 0;
        if (weightsize_ < 0)
            weightsize_ = 0;
        setMetaInfoFromSource();
    }
}
string PLearn::TransposeVMatrix::classname ( ) const [virtual]

Reimplemented from PLearn::SourceVMatrix.

Definition at line 64 of file TransposeVMatrix.cc.

void PLearn::TransposeVMatrix::declareOptions ( OptionList ol) [static, protected]

Declares this class' options.

Reimplemented from PLearn::SourceVMatrix.

Definition at line 69 of file TransposeVMatrix.cc.

{
    // ### Declare all of this object's options here
    // ### For the "flags" of each option, you should typically specify
    // ### one of OptionBase::buildoption, OptionBase::learntoption or
    // ### OptionBase::tuningoption. Another possible flag to be combined with
    // ### is OptionBase::nosave

    // ### ex:
    // declareOption(ol, "myoption", &TransposeVMatrix::myoption, OptionBase::buildoption,
    //               "Help text describing this option");
    // ...

    // Now call the parent class' declareOptions
    inherited::declareOptions(ol);
}
static const PPath& PLearn::TransposeVMatrix::declaringFile ( ) [inline, static]

Reimplemented from PLearn::SourceVMatrix.

Definition at line 115 of file TransposeVMatrix.h.

TransposeVMatrix * PLearn::TransposeVMatrix::deepCopy ( CopiesMap copies) const [virtual]

Reimplemented from PLearn::SourceVMatrix.

Definition at line 64 of file TransposeVMatrix.cc.

void PLearn::TransposeVMatrix::getColumn ( int  i,
Vec  v 
) const [protected, virtual]

Copies column i into v (which must have appropriate length equal to the VMat's length).

Reimplemented from PLearn::VMatrix.

Definition at line 125 of file TransposeVMatrix.cc.

{
    //We do not buffer the column...
    source->getRow(j, v);
}
void PLearn::TransposeVMatrix::getMat ( int  i,
int  j,
Mat  m 
) const [protected, virtual]

Copies the submatrix starting at i,j into m (which must have appropriate length and width).

Reimplemented from PLearn::VMatrix.

Definition at line 134 of file TransposeVMatrix.cc.

References PLearn::TMat< T >::length(), m, PLERROR, and PLearn::TMat< T >::width().

{
#ifdef BOUNDCHECK
    if(i<0 || j<0 || i+m.length()>length() || j+m.width()>width())
        PLERROR("In VMatrix::getMat(i,j,m) OUT OF BOUNDS");
#endif
    Vec tmp(m.length());
    for(int ii=0; ii<m.width(); ii++)
    {
        source->getSubRow(i+ii, j,tmp);
        for(int k=0;k<m.length();k++)
            m(k,ii)=tmp[k];
    }
}

Here is the call graph for this function:

void PLearn::TransposeVMatrix::getNewRow ( int  i,
const Vec v 
) const [protected, virtual]

Fill the vector 'v' with the content of the i-th row.

v is assumed to be the right size.

Reimplemented from PLearn::SourceVMatrix.

Definition at line 117 of file TransposeVMatrix.cc.

{
    source->getColumn(i, v);
}
OptionList & PLearn::TransposeVMatrix::getOptionList ( ) const [virtual]

Reimplemented from PLearn::SourceVMatrix.

Definition at line 64 of file TransposeVMatrix.cc.

OptionMap & PLearn::TransposeVMatrix::getOptionMap ( ) const [virtual]

Reimplemented from PLearn::SourceVMatrix.

Definition at line 64 of file TransposeVMatrix.cc.

RemoteMethodMap & PLearn::TransposeVMatrix::getRemoteMethodMap ( ) const [virtual]

Reimplemented from PLearn::SourceVMatrix.

Definition at line 64 of file TransposeVMatrix.cc.

void PLearn::TransposeVMatrix::makeDeepCopyFromShallowCopy ( CopiesMap copies) [virtual]

Transforms a shallow copy into a deep copy.

Reimplemented from PLearn::SourceVMatrix.

Definition at line 152 of file TransposeVMatrix.cc.


Member Data Documentation

Reimplemented from PLearn::SourceVMatrix.

Definition at line 115 of file TransposeVMatrix.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines