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

#include <Correspondence.h>

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

List of all members.

Public Member Functions

 Correspondence ()
 Default constructor.
 Correspondence (const Correspondence &c)
 Copy constructor.
virtual ~Correspondence ()
 Virtual destructor.
virtual string classname () const
virtual OptionListgetOptionList () const
virtual OptionMapgetOptionMap () const
virtual RemoteMethodMapgetRemoteMethodMap () const
virtual CorrespondencedeepCopy (CopiesMap &copies) const
virtual void build ()
 Post-constructor.
virtual void makeDeepCopyFromShallowCopy (CopiesMap &copies)
 Transforms a shallow copy into a deep copy.
Correspondenceoperator= (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 PPathdeclaringFile ()
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.

Detailed Description

Definition at line 55 of file Correspondence.h.


Member Typedef Documentation

Reimplemented from PLearn::Object.

Definition at line 60 of file Correspondence.h.


Constructor & Destructor Documentation

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)

Copy constructor.

Definition at line 57 of file Correspondence.cc.

                                                        :
  sid( c.sid ),
  mid( c.mid ),
  model_id( c.model_id ),
  votes( c.votes ),
  correlation( c.correlation )
{}
virtual PLearn::Correspondence::~Correspondence ( ) [inline, virtual]

Virtual destructor.

Definition at line 85 of file Correspondence.h.

{}

Member Function Documentation

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.

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

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_().

Here is the call graph for this function:

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().

{}

Here is the caller graph for this function:

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);
}

Here is the call graph for this function:

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!");
}

Here is the call graph for this function:

Correspondence & PLearn::Correspondence::operator= ( const Correspondence c)

Definition at line 116 of file Correspondence.cc.

References correlation, mid, model_id, sid, and votes.

{
  sid = c.sid;
  mid = c.mid;
  model_id = c.model_id;
  votes = c.votes;
  correlation = c.correlation;

  return *this;
}

Member Data Documentation

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=().


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