|
PLearn 0.1
|
#include <Correspondence.h>


Public Member Functions | |
| Correspondence () | |
| Default constructor. | |
| Correspondence (const Correspondence &c) | |
| Copy constructor. | |
| virtual | ~Correspondence () |
| Virtual destructor. | |
| virtual string | classname () const |
| virtual OptionList & | getOptionList () const |
| virtual OptionMap & | getOptionMap () const |
| virtual RemoteMethodMap & | getRemoteMethodMap () const |
| virtual Correspondence * | deepCopy (CopiesMap &copies) const |
| virtual void | build () |
| Post-constructor. | |
| virtual void | makeDeepCopyFromShallowCopy (CopiesMap &copies) |
| Transforms a shallow copy into a deep copy. | |
| Correspondence & | operator= (const Correspondence &c) |
Static Public Member Functions | |
| static string | _classname_ () |
| static OptionList & | _getOptionList_ () |
| static RemoteMethodMap & | _getRemoteMethodMap_ () |
| static Object * | _new_instance_for_typemap_ () |
| static bool | _isa_ (const Object *o) |
| static void | _static_initialize_ () |
| static const PPath & | declaringFile () |
| static int | compare (const Correspondence &p, const Correspondence &q) |
Public Attributes | |
| int | sid |
| int | mid |
| int | model_id |
| real | votes |
| real | correlation |
Static Public Attributes | |
| static StaticInitializer | _static_initializer_ |
Static Protected Member Functions | |
| static void | declareOptions (OptionList &ol) |
| Declares this class' options. | |
Private Types | |
| typedef Object | inherited |
Private Member Functions | |
| void | build_ () |
| This does the actual building. | |
Definition at line 55 of file Correspondence.h.
typedef Object PLearn::Correspondence::inherited [private] |
Reimplemented from PLearn::Object.
Definition at line 60 of file Correspondence.h.
| PLearn::Correspondence::Correspondence | ( | ) |
Default constructor.
Definition at line 49 of file Correspondence.cc.
: sid( 0 ), mid( 0 ), model_id( 0 ), votes( 0 ), correlation( 0 ) {}
| PLearn::Correspondence::Correspondence | ( | const Correspondence & | c | ) |
| virtual PLearn::Correspondence::~Correspondence | ( | ) | [inline, virtual] |
| string PLearn::Correspondence::_classname_ | ( | ) | [static] |
Reimplemented from PLearn::Object.
Definition at line 68 of file Correspondence.cc.
| OptionList & PLearn::Correspondence::_getOptionList_ | ( | ) | [static] |
Reimplemented from PLearn::Object.
Definition at line 68 of file Correspondence.cc.
| RemoteMethodMap & PLearn::Correspondence::_getRemoteMethodMap_ | ( | ) | [static] |
Reimplemented from PLearn::Object.
Definition at line 68 of file Correspondence.cc.
Reimplemented from PLearn::Object.
Definition at line 68 of file Correspondence.cc.
| Object * PLearn::Correspondence::_new_instance_for_typemap_ | ( | ) | [static] |
Reimplemented from PLearn::Object.
Definition at line 68 of file Correspondence.cc.
| StaticInitializer Correspondence::_static_initializer_ & PLearn::Correspondence::_static_initialize_ | ( | ) | [static] |
Reimplemented from PLearn::Object.
Definition at line 68 of file Correspondence.cc.
| void PLearn::Correspondence::build | ( | ) | [virtual] |
Post-constructor.
The normal implementation 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::Object.
Definition at line 96 of file Correspondence.cc.
References PLearn::Object::build(), and build_().
{
inherited::build();
build_();
}

| void PLearn::Correspondence::build_ | ( | ) | [private] |
This does the actual building.
Reimplemented from PLearn::Object.
Definition at line 93 of file Correspondence.cc.
Referenced by build().
{}

| string PLearn::Correspondence::classname | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 68 of file Correspondence.cc.
| int PLearn::Correspondence::compare | ( | const Correspondence & | p, |
| const Correspondence & | q | ||
| ) | [static] |
Definition at line 127 of file Correspondence.cc.
References mid, model_id, and sid.
{
if( p.model_id < q.model_id ) return -1;
if( p.model_id > q.model_id ) return 1;
if( p.sid < q.sid ) return -1;
if( p.sid > q.sid ) return 1;
if( p.mid < q.mid ) return -1;
if( p.mid > q.mid ) return 1;
return 0;
}
| void PLearn::Correspondence::declareOptions | ( | OptionList & | ol | ) | [static, protected] |
Declares this class' options.
Reimplemented from PLearn::Object.
Definition at line 70 of file Correspondence.cc.
References PLearn::OptionBase::buildoption, correlation, PLearn::declareOption(), PLearn::Object::declareOptions(), mid, model_id, sid, and votes.
{
declareOption(ol, "sid", &Correspondence::sid, OptionBase::buildoption,
"dunno yet...");
declareOption(ol, "mid", &Correspondence::mid, OptionBase::buildoption,
"dunno yet...");
declareOption(ol, "model_id", &Correspondence::model_id,
OptionBase::buildoption,
"dunno, probably something to do with a model identifier...");
declareOption(ol, "votes", &Correspondence::votes, OptionBase::buildoption,
"dunno, probably something to do with a number of votes...");
declareOption(ol, "correlation", &Correspondence::correlation,
OptionBase::buildoption,
"dunno, probably the correlation value itself...");
// Now call the parent class' declareOptions
inherited::declareOptions(ol);
}

| static const PPath& PLearn::Correspondence::declaringFile | ( | ) | [inline, static] |
Reimplemented from PLearn::Object.
Definition at line 101 of file Correspondence.h.
| Correspondence * PLearn::Correspondence::deepCopy | ( | CopiesMap & | copies | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 68 of file Correspondence.cc.
| OptionList & PLearn::Correspondence::getOptionList | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 68 of file Correspondence.cc.
| OptionMap & PLearn::Correspondence::getOptionMap | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 68 of file Correspondence.cc.
| RemoteMethodMap & PLearn::Correspondence::getRemoteMethodMap | ( | ) | const [virtual] |
Reimplemented from PLearn::Object.
Definition at line 68 of file Correspondence.cc.
| void PLearn::Correspondence::makeDeepCopyFromShallowCopy | ( | CopiesMap & | copies | ) | [virtual] |
Transforms a shallow copy into a deep copy.
Reimplemented from PLearn::Object.
Definition at line 102 of file Correspondence.cc.
References PLearn::Object::makeDeepCopyFromShallowCopy(), and PLERROR.
{
inherited::makeDeepCopyFromShallowCopy(copies);
// ### Call deepCopyField on all "pointer-like" fields
// ### that you wish to be deepCopied rather than
// ### shallow-copied.
// ### ex:
// deepCopyField(trainvec, copies);
// ### Remove this line when you have fully implemented this method.
PLERROR("Correspondence::makeDeepCopyFromShallowCopy not fully (correctly) implemented yet!");
}

| Correspondence & PLearn::Correspondence::operator= | ( | const Correspondence & | c | ) |
Reimplemented from PLearn::Object.
Definition at line 101 of file Correspondence.h.
Definition at line 72 of file Correspondence.h.
Referenced by declareOptions(), and operator=().
Definition at line 69 of file Correspondence.h.
Referenced by compare(), declareOptions(), PLearn::operator<(), and operator=().
Definition at line 70 of file Correspondence.h.
Referenced by compare(), declareOptions(), PLearn::operator<(), and operator=().
Definition at line 68 of file Correspondence.h.
Referenced by compare(), declareOptions(), PLearn::operator<(), and operator=().
Definition at line 71 of file Correspondence.h.
Referenced by declareOptions(), and operator=().
1.7.4