#include <VMatrixFromDistribution.h>
Inheritance diagram for PLearn::VMatrixFromDistribution:
Public Member Functions | |
VMatrixFromDistribution () | |
virtual void | build () |
Should call simply inherited::build(), then this class's build_(). | |
virtual void | makeDeepCopyFromShallowCopy (map< const void *, void * > &copies) |
Transforms a shallow copy into a deep copy. | |
PLEARN_DECLARE_OBJECT (VMatrixFromDistribution) | |
virtual real | get (int i, int j) const |
returns element (i,j) | |
virtual void | getSubRow (int i, int j, Vec v) const |
fills v with the subrow i lying between columns j (inclusive) and j+v.length() (exclusive) | |
virtual void | getRow (int i, Vec v) const |
copies row i into v (which must have appropriate length equal to the VMat's width) | |
virtual void | getColumn (int i, 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) | |
virtual Mat | toMat () const |
Public Attributes | |
PP< PDistribution > | distr |
string | mode |
long | generator_seed |
int | nsamples |
Vec | mins |
Vec | maxs |
int | samples_per_dim |
Static Protected Member Functions | |
void | declareOptions (OptionList &ol) |
Declares this class' options. | |
Protected Attributes | |
Mat | data |
Will hold the data sampled from the distribution. | |
Private Types | |
typedef VMatrix | inherited |
Private Member Functions | |
void | build_ () |
This does the actual building. |
|
Reimplemented from PLearn::VMatrix. Definition at line 55 of file VMatrixFromDistribution.h. |
|
Definition at line 46 of file VMatrixFromDistribution.cc. References mode, PLearn::sample(), and samples_per_dim. |
|
Should call simply inherited::build(), then this class's build_(). This method should be callable again at later times, after modifying some option fields to change the "architecture" of the object. Reimplemented from PLearn::VMatrix. Definition at line 153 of file VMatrixFromDistribution.cc. References build_(). |
|
This does the actual building.
Reimplemented from PLearn::VMatrix. Definition at line 89 of file VMatrixFromDistribution.cc. References data, distr, generator_seed, k, maxs, mins, mode, nsamples, PLERROR, PLearn::pow(), PLearn::TMat< T >::resize(), samples_per_dim, PLearn::TVec< T >::subVec(), PLearn::Vec, and PLearn::TMat< T >::width(). Referenced by build(). |
|
Declares this class' options.
Reimplemented from PLearn::VMatrix. Definition at line 58 of file VMatrixFromDistribution.cc. References PLearn::declareOption(), and PLearn::OptionList. |
|
returns element (i,j)
Reimplemented from PLearn::VMatrix. Definition at line 164 of file VMatrixFromDistribution.cc. References data. |
|
copies column i into v (which must have appropriate length equal to the VMat's length)
Reimplemented from PLearn::VMatrix. Definition at line 167 of file VMatrixFromDistribution.cc. References PLearn::TMat< T >::column(), and data. |
|
copies the submatrix starting at i,j into m (which must have appropriate length and width)
Reimplemented from PLearn::VMatrix. Definition at line 176 of file VMatrixFromDistribution.cc. References data, PLearn::TMat< T >::length(), PLearn::TMat< T >::subMat(), and PLearn::TMat< T >::width(). |
|
copies row i into v (which must have appropriate length equal to the VMat's width)
Reimplemented from PLearn::VMatrix. Definition at line 173 of file VMatrixFromDistribution.cc. References data. |
|
fills v with the subrow i lying between columns j (inclusive) and j+v.length() (exclusive)
Reimplemented from PLearn::VMatrix. Definition at line 170 of file VMatrixFromDistribution.cc. References data, and PLearn::TVec< T >::length(). |
|
Transforms a shallow copy into a deep copy.
Reimplemented from PLearn::VMatrix. Definition at line 159 of file VMatrixFromDistribution.cc. |
|
|
|
returns a Mat with the same data as this VMat The default version of this method copies the data in a fresh Mat created in memory However this method will typically be overrided by subclasses (such as MemoryVMatrix) whose internal representation is already a Mat in order to return this Mat directly to avoid a new memory allocation and copy of elements. In this case, and in this case only, modifying the elements of the returned Mat will logically result in modified elements in the original VMatrix view of it. Reimplemented from PLearn::VMatrix. Definition at line 179 of file VMatrixFromDistribution.cc. References data. |
|
Will hold the data sampled from the distribution.
Definition at line 60 of file VMatrixFromDistribution.h. Referenced by build_(), get(), getColumn(), getMat(), getRow(), getSubRow(), and toMat(). |
|
Definition at line 68 of file VMatrixFromDistribution.h. Referenced by build_(). |
|
Definition at line 72 of file VMatrixFromDistribution.h. Referenced by build_(). |
|
Definition at line 76 of file VMatrixFromDistribution.h. Referenced by build_(). |
|
Definition at line 76 of file VMatrixFromDistribution.h. Referenced by build_(). |
|
Definition at line 69 of file VMatrixFromDistribution.h. Referenced by build_(). |
|
Definition at line 73 of file VMatrixFromDistribution.h. Referenced by build_(). |
|
Definition at line 77 of file VMatrixFromDistribution.h. Referenced by build_(), and VMatrixFromDistribution(). |