Horus Doc || C++ Reference || Class Overview   Pixels   Images   Detector   Geometry   Registry || Doxygen's quick Index  

HxBlob2dRelation Class Reference

A relation in a set of blobs in 2D. More...

#include <HxBlob2dRelation.h>

List of all members.

Public Methods

 HxBlob2dRelation ()
 Constructor. More...

 ~HxBlob2dRelation ()
 Destructor. More...

int ident () const
 The identifier of this relation. More...

void add (HxBlob2d *blob, HxBlob2dList rels)
 Add a blob and its relations. More...

HxBlob2dListConstIter getBlobBegin () const
 Get begin of the blobs. More...

HxBlob2dListConstIter getBlobEnd () const
 Get end (STL term) of the blobs. More...

HxBlob2dList findRelatedBlobs (HxBlob2d *blob)
 Find relations of given blob. More...

HxBlob2dListConstIter findRelatedBlobsBegin (HxBlob2d *blob) const
 Get begin of related blobs list. More...

HxBlob2dListConstIter findRelatedBlobsEnd (HxBlob2d *blob) const
 Get end (STL term) of related blobs list. More...

HxBlob2dListBackInserter findRelatedBlobsInserter (HxBlob2d *blob)
 Get a backinserter for related blobs list. More...

STD_OSTREAM & put (STD_OSTREAM &os) const
 Put relation on stream. More...


Detailed Description

A relation in a set of blobs in 2D.

Basically, for each blob a list "related" blobs is stored.


Constructor & Destructor Documentation

HxBlob2dRelation::HxBlob2dRelation  
 

Constructor.

00016 {
00017 }

HxBlob2dRelation::~HxBlob2dRelation  
 

Destructor.

00020 {
00021     // todo
00022 }


Member Function Documentation

int HxBlob2dRelation::ident   const
 

The identifier of this relation.

void HxBlob2dRelation::add HxBlob2d   blob,
HxBlob2dList    rels
 

Add a blob and its relations.

00026 {
00027     _head.push_back(blob);
00028     _tail.push_back(rels);
00029 }

HxBlob2dListConstIter HxBlob2dRelation::getBlobBegin   const
 

Get begin of the blobs.

00033 {
00034     return _head.begin();
00035 }

HxBlob2dListConstIter HxBlob2dRelation::getBlobEnd   const
 

Get end (STL term) of the blobs.

00039 {
00040     return _head.end();
00041 }

HxBlob2dList HxBlob2dRelation::findRelatedBlobs HxBlob2d   blob
 

Find relations of given blob.

00045 {
00046     for (int i=0 ; i<_head.size() ; i++)
00047         if (_head[i] == blob)
00048             return _tail[i];
00049     return HxBlob2dList();
00050 }

HxBlob2dListConstIter HxBlob2dRelation::findRelatedBlobsBegin HxBlob2d   blob const
 

Get begin of related blobs list.

00054 {
00055     for (int i=0 ; i<_head.size() ; i++)
00056         if (_head[i] == blob)
00057             return _tail[i].begin();
00058     return HxBlob2dListConstIter();
00059 }

HxBlob2dListConstIter HxBlob2dRelation::findRelatedBlobsEnd HxBlob2d   blob const
 

Get end (STL term) of related blobs list.

00063 {
00064     for (int i=0 ; i<_head.size() ; i++)
00065         if (_head[i] == blob)
00066             return _tail[i].end();
00067     return HxBlob2dListConstIter();
00068 }

HxBlob2dListBackInserter HxBlob2dRelation::findRelatedBlobsInserter HxBlob2d   blob
 

Get a backinserter for related blobs list.

00072 {
00073     for (int i=0 ; i<_head.size() ; i++)
00074         if (_head[i] == blob)
00075             return std::back_inserter(_tail[i]);
00076     static HxBlob2dList dummyList;
00077     return std::back_inserter(dummyList);
00078 }

STD_OSTREAM & HxBlob2dRelation::put STD_OSTREAM &    os const
 

Put relation on stream.

00082 {
00083     os << "Blob2dRelation " << STD_ENDL;
00084     for(int i=0 ; i<_head.size() ; i++) {
00085         os << "  blob " << _head[i]->ident() << " rels ";
00086         for (HxBlob2dListConstIter b=_tail[i].begin() ; 
00087                                    b < _tail[i].end() ; b++)
00088             os << (*b)->ident() << ", ";
00089         os << STD_ENDL;
00090     }
00091     return os;
00092 }


The documentation for this class was generated from the following files:
Generated on Mon Jan 27 15:48:57 2003 for C++Reference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001