TIntList Class Reference

#include <TIntList.h>

List of all members.

Public Member Functions

 TIntList ()
 ~TIntList ()
void Add (Int_t num)
void AddFirst (Int_t num)
void AddLast (Int_t num)
void AddAt (Int_t num, Int_t idx)
Int_t First (void)
Int_t Last (void)
void Remove (Int_t element)
void Delete (Option_t *option="")
Int_t At (Int_t slot)
Int_t NumberOfElements (void)
Bool_t Exists (Int_t num)
void Sort ()
void Print (Option_t *="") const

Private Attributes

TList * fList
TObjNumfNum


Detailed Description

Definition at line 39 of file TIntList.h.


Constructor & Destructor Documentation

TIntList::TIntList (  ) 

Definition at line 6 of file TIntList.cxx.

00007 {
00008     fNum = new TObjNum(1);
00009     fList = new TList(fNum);
00010 }

TIntList::~TIntList (  ) 

Definition at line 12 of file TIntList.cxx.

References fList, and fNum.

00013 { 
00014     fList->Delete();
00015     delete fList;
00016     delete fNum;
00017 }


Member Function Documentation

void TIntList::Add ( Int_t  num  ) 

Definition at line 19 of file TIntList.cxx.

References fList.

Referenced by BFLVoronoiMaker::DeleteSubstructure(), BFLInterpolation::FormVoronoiCell(), BFLVorOperator::GetFirstIntersectEdge(), BFLVoronoiMaker::Make(), BFLVoronoiMaker::MarkEdgesToDelete(), and BFLVoronoiMaker::MarkVerticesToDelete().

00020 {
00021     fList->Add(new TObjNum(num));
00022 }

void TIntList::AddAt ( Int_t  num,
Int_t  idx 
)

Definition at line 39 of file TIntList.cxx.

References fList.

Referenced by BFLWingedEdge::DeleteFirstAvailableEdgeID(), BFLWingedEdge::DeleteFirstAvailableVtxID(), and BFLVoronoiMaker::IncreaseEntropy().

00040 {
00041    fList->AddAt(new TObjNum(num),idx);
00042 }

void TIntList::AddFirst ( Int_t  num  ) 

Definition at line 24 of file TIntList.cxx.

References fList.

00025 {
00026     fList->AddFirst(new TObjNum(num));
00027 }

void TIntList::AddLast ( Int_t  num  ) 

Definition at line 29 of file TIntList.cxx.

References fList.

Referenced by BFLVorOperator::RetrieveEdgesIncidentToVtx(), BFLVorOperator::RetrieveEdgesSurrPolygon(), BFLVorOperator::RetrieveVtxSurrPolygon(), and BFLVorOperator::VtxIsInsideNewPolyg().

00030 {
00031     fList->AddLast(new TObjNum(num));
00032 }

Int_t TIntList::At ( Int_t  slot  ) 

Definition at line 44 of file TIntList.cxx.

References fList.

Referenced by BFLVoronoiMaker::DeleteSubstructure(), BFLVoronoiMaker::GetAnotherEdgeAround(), BFLVorOperator::GetFirstIntersectEdge(), BFLVorOperator::GetNextIntersectEdge(), BFLVoronoiMaker::MarkEdgesToDelete(), BFLVoronoiMaker::MarkVerticesToDelete(), BFLInterpolation::NNInterpolation(), BFLInterpolation::PlanarInterpolation(), BFLVoronoiMaker::RandomToSorted(), BFLVoronoiMaker::RemoveRefsToDeletedEdges(), BFLVoronoiMaker::SortedToRandom(), and BFLVoronoiMaker::WingedEdgePatch().

00045 {
00046    return ((TObjNum *)fList->At(slot))->GetNum();
00047 }

void TIntList::Delete ( Option_t *  option = ""  ) 

Definition at line 34 of file TIntList.cxx.

References fList.

Referenced by BFLVoronoiMaker::NewStructureInit(), BFLInterpolation::NNInterpolation(), BFLInterpolation::ResetForNextQuery(), BFLVorOperator::ResetVtxCache(), BFLVoronoiMaker::SubstructureInit(), and BFLInterpolation::~BFLInterpolation().

00035 { 
00036    fList->Delete();
00037 }

Bool_t TIntList::Exists ( Int_t  num  ) 

Definition at line 72 of file TIntList.cxx.

References fList, and TObjNum::GetNum().

Referenced by BFLVoronoiMaker::DeleteSubstructure(), BFLVoronoiMaker::GetAnotherEdgeAround(), BFLVoronoiMaker::MarkEdgesToDelete(), BFLVoronoiMaker::MarkVerticesToDelete(), and BFLVorOperator::VtxIsInsideNewPolyg().

00073 {
00074   Bool_t Exists = kFALSE;
00075   TObjNum * IntObj;
00076   TIter next(fList);
00077   
00078   while( (IntObj = (TObjNum *)next()) ) {
00079     if(num == IntObj->GetNum())  Exists = kTRUE;
00080   }
00081   delete IntObj;
00082 
00083   return Exists;
00084 }

Int_t TIntList::First ( void   ) 

Definition at line 49 of file TIntList.cxx.

References fList.

Referenced by BFLWingedEdge::DeleteFirstAvailableEdgeID(), BFLWingedEdge::DeleteFirstAvailableVtxID(), BFLWingedEdge::FirstAvailableEdgeID(), and BFLWingedEdge::FirstAvailableVtxID().

00050 {
00051   return ((TObjNum *)fList->First())->GetNum();
00052 }

Int_t TIntList::Last ( void   ) 

Definition at line 54 of file TIntList.cxx.

References fList.

Referenced by BFLWingedEdge::MaxAvailableEdgeID(), and BFLWingedEdge::MaxAvailableVtxID().

00055 {
00056   return ((TObjNum *)fList->Last())->GetNum();
00057 }

Int_t TIntList::NumberOfElements ( void   ) 

Definition at line 59 of file TIntList.cxx.

References fList.

Referenced by BFLWingedEdge::DeleteFirstAvailableEdgeID(), BFLWingedEdge::DeleteFirstAvailableVtxID(), BFLVoronoiMaker::DeleteSubstructure(), BFLVoronoiMaker::GetAnotherEdgeAround(), BFLVorOperator::GetFirstIntersectEdge(), BFLVorOperator::GetNextIntersectEdge(), BFLVoronoiMaker::MarkEdgesToDelete(), BFLVoronoiMaker::MarkVerticesToDelete(), BFLInterpolation::NNInterpolation(), BFLInterpolation::PlanarInterpolation(), BFLVoronoiMaker::RemoveRefsToDeletedEdges(), and BFLVoronoiMaker::WingedEdgePatch().

00060 {
00061   Int_t NofElements = 0;
00062   TObjNum * IntObj;
00063   TIter next(fList);
00064   
00065   while( (IntObj = (TObjNum *)next()) ) NofElements ++;
00066   
00067   delete IntObj;
00068 
00069   return NofElements;
00070 }

void TIntList::Print ( Option_t *  = ""  )  const [inline]

Definition at line 66 of file TIntList.h.

References fList.

00066 { fList->Print(); }

void TIntList::Remove ( Int_t  element  ) 

Definition at line 86 of file TIntList.cxx.

References fList, and TObjNum::GetNum().

Referenced by BFLWingedEdge::DeleteFirstAvailableEdgeID(), BFLWingedEdge::DeleteFirstAvailableVtxID(), and BFLVorOperator::GetNextIntersectEdge().

00087 {
00088 // Remove all occurences of 'element' from the list
00089 
00090   TObjNum * IntObj;
00091   TObjNum * FndObj;
00092   TIter next(fList);
00093   
00094   while( (IntObj = (TObjNum *)next()) ) {
00095     if(element == IntObj->GetNum()) {
00096        FndObj = (TObjNum*) fList->Remove(IntObj);
00097        delete FndObj;
00098     }
00099   }
00100 
00101 }

void TIntList::Sort (  )  [inline]

Definition at line 65 of file TIntList.h.

References fList.

Referenced by BFLWingedEdge::DeleteFirstAvailableEdgeID(), BFLWingedEdge::DeleteFirstAvailableVtxID(), BFLWingedEdge::FirstAvailableEdgeID(), BFLWingedEdge::FirstAvailableVtxID(), BFLWingedEdge::MaxAvailableEdgeID(), and BFLWingedEdge::MaxAvailableVtxID().

00065 { fList->Sort();  }


Member Data Documentation

TList* TIntList::fList [private]

Definition at line 42 of file TIntList.h.

Referenced by Add(), AddAt(), AddFirst(), AddLast(), At(), Delete(), Exists(), First(), Last(), NumberOfElements(), Print(), Remove(), Sort(), and ~TIntList().

TObjNum* TIntList::fNum [private]

Definition at line 43 of file TIntList.h.

Referenced by ~TIntList().


The documentation for this class was generated from the following files:
Generated on Mon Aug 11 01:07:01 2014 for loon by  doxygen 1.4.7