GClasses

GClasses::GUniformRelation Class Reference

A relation with a minimal memory footprint that assumes all attributes are continuous, or all of them are nominal and have the same number of possible values. More...

#include <GMatrix.h>

Inheritance diagram for GClasses::GUniformRelation:
GClasses::GRelation

List of all members.

Public Member Functions

 GUniformRelation (size_t attrCount, size_t valueCount=0)
 GUniformRelation (GDomNode *pNode)
virtual RelationType type ()
 Returns the type of relation.
virtual GDomNodeserialize (GDom *pDoc)
 Serializes this object.
virtual size_t size ()
 Returns the number of attributes (columns)
virtual size_t valueCount (size_t nAttr)
 Returns the number of values in each nominal attribute (or 0 if the attributes are continuous)
virtual bool areContinuous (size_t first, size_t count)
 See the comment for GRelation::areContinuous.
virtual bool areNominal (size_t first, size_t count)
 See the comment for GRelation::areNominal.
virtual GRelationclone ()
 Returns a copy of this object.
virtual GRelationcloneSub (size_t start, size_t count)
 Returns a deep copy of the specified subset of this relation.
virtual void deleteAttribute (size_t index)
 Drop the specified attribute.
virtual void swapAttributes (size_t nAttr1, size_t nAttr2)
 Swap two attributes.
virtual bool isCompatible (GRelation &that)
 Returns true iff this and that have the same number of values for each attribute.

Protected Attributes

size_t m_attrCount
size_t m_valueCount

Detailed Description

A relation with a minimal memory footprint that assumes all attributes are continuous, or all of them are nominal and have the same number of possible values.


Constructor & Destructor Documentation

GClasses::GUniformRelation::GUniformRelation ( size_t  attrCount,
size_t  valueCount = 0 
) [inline]
GClasses::GUniformRelation::GUniformRelation ( GDomNode pNode)

Member Function Documentation

virtual bool GClasses::GUniformRelation::areContinuous ( size_t  first,
size_t  count 
) [inline, virtual]

See the comment for GRelation::areContinuous.

Implements GClasses::GRelation.

virtual bool GClasses::GUniformRelation::areNominal ( size_t  first,
size_t  count 
) [inline, virtual]

See the comment for GRelation::areNominal.

Implements GClasses::GRelation.

virtual GRelation* GClasses::GUniformRelation::clone ( ) [inline, virtual]

Returns a copy of this object.

Implements GClasses::GRelation.

virtual GRelation* GClasses::GUniformRelation::cloneSub ( size_t  start,
size_t  count 
) [inline, virtual]

Returns a deep copy of the specified subset of this relation.

Implements GClasses::GRelation.

virtual void GClasses::GUniformRelation::deleteAttribute ( size_t  index) [virtual]

Drop the specified attribute.

Implements GClasses::GRelation.

virtual bool GClasses::GUniformRelation::isCompatible ( GRelation that) [virtual]

Returns true iff this and that have the same number of values for each attribute.

Reimplemented from GClasses::GRelation.

virtual GDomNode* GClasses::GUniformRelation::serialize ( GDom pDoc) [virtual]

Serializes this object.

Implements GClasses::GRelation.

virtual size_t GClasses::GUniformRelation::size ( ) [inline, virtual]

Returns the number of attributes (columns)

Implements GClasses::GRelation.

virtual void GClasses::GUniformRelation::swapAttributes ( size_t  nAttr1,
size_t  nAttr2 
) [inline, virtual]

Swap two attributes.

Implements GClasses::GRelation.

virtual RelationType GClasses::GUniformRelation::type ( ) [inline, virtual]

Returns the type of relation.

Implements GClasses::GRelation.

virtual size_t GClasses::GUniformRelation::valueCount ( size_t  nAttr) [inline, virtual]

Returns the number of values in each nominal attribute (or 0 if the attributes are continuous)

Implements GClasses::GRelation.


Member Data Documentation