Public Member Functions | Protected Attributes | Friends

ColTab::IndexedLookUpTable Class Reference

Looks up color for certain value. Keeps a pre-calc list of colors. More...

List of all members.

Public Member Functions

 IndexedLookUpTable (const Sequence &, int nrcols=0, const Mapper *m=0)
void update ()
 Call when sequence, mapper, or nr cols changed.
Color color (float v) const
int indexForValue (float) const
Color colorForIndex (int) const
void setMapper (const Mapper *m)
void setNrCols (int n)
int nrCols ()

Protected Attributes

const Sequenceseq_
const Mappermapper_
int nrcols_
TypeSet< Colorcols_

Friends

class Indexer

Detailed Description

Looks up color for certain value. Keeps a pre-calc list of colors.

Note that sequence and mapper need to stay alive; no copy is made.


Constructor & Destructor Documentation

ColTab::IndexedLookUpTable::IndexedLookUpTable ( const Sequence ,
int  nrcols = 0,
const Mapper m = 0 
)

Member Function Documentation

Color ColTab::IndexedLookUpTable::color ( float  v  )  const [inline]
Color ColTab::IndexedLookUpTable::colorForIndex ( int   )  const
int ColTab::IndexedLookUpTable::indexForValue ( float   )  const
int ColTab::IndexedLookUpTable::nrCols (  )  [inline]
void ColTab::IndexedLookUpTable::setMapper ( const Mapper m  )  [inline]
void ColTab::IndexedLookUpTable::setNrCols ( int  n  )  [inline]
void ColTab::IndexedLookUpTable::update (  ) 

Call when sequence, mapper, or nr cols changed.


Friends And Related Function Documentation

friend class Indexer [friend]

Member Data Documentation