List of all members.
Public Member Functions |
| lut () |
| lut (const TB &a_min, const TB &a_max, unsigned int a_coln) |
virtual | ~lut () |
| lut (const lut &a_from) |
lut & | operator= (const lut &a_from) |
TO | apply (const TB &a_x) const |
Detailed Description
template<class TB, class TO>
class inlib::lut< TB, TO >
Definition at line 11 of file lut.
Constructor & Destructor Documentation
template<class TB, class TO>
Definition at line 13 of file lut.
:m_min(0),m_max(0)
,m_bornen(0)
,m_bornes(0)
{}
template<class TB, class TO>
inlib::lut< TB, TO >::lut |
( |
const TB & |
a_min, |
|
|
const TB & |
a_max, |
|
|
unsigned int |
a_coln |
|
) |
| [inline] |
Definition at line 18 of file lut.
:m_min(a_min)
,m_max(a_max)
{
if(m_max<=m_min) m_max = m_min+1;
if(a_coln<3) {
m_bornen = 2;
m_bornes = new TB[m_bornen];
m_bornes[0] = m_min;
m_bornes[1] = m_max;
} else {
m_bornen = a_coln-1;
m_bornes = new TB[m_bornen];
TB dx = (m_max-m_min)/(m_bornen-1);
for(unsigned int i=0;i<m_bornen;i++) {
m_bornes[i] = m_min+dx*i;
}
}
}
template<class TB, class TO>
Definition at line 46 of file lut.
template<class TB, class TO>
Definition at line 48 of file lut.
:m_min(a_from.m_min)
,m_max(a_from.m_max)
,m_bornen(a_from.m_bornen)
,m_bornes(0)
{
if(m_bornen) {
m_bornes = new TB[m_bornen];
for(unsigned int i=0;i<m_bornen;i++) {
m_bornes[i] = a_from.m_bornes[i];
}
}
}
Member Function Documentation
template<class TB, class TO>
TO inlib::lut< TB, TO >::apply |
( |
const TB & |
a_x | ) |
const [inline] |
Definition at line 77 of file lut.
{
TB* pos = m_bornes;
for(TO i=0;i<m_bornen;i++,pos++) {
if(a_x<*pos) return i;
}
return m_bornen;
}
template<class TB, class TO>
Definition at line 61 of file lut.
{
delete [] m_bornes;
m_bornes = 0;
m_min = a_from.m_min;
m_max = a_from.m_max;
m_bornen = a_from.m_bornen;
if(m_bornen) {
m_bornes = new TB[m_bornen];
for(unsigned int i=0;i<m_bornen;i++) {
m_bornes[i] = a_from.m_bornes[i];
}
}
return *this;
}
The documentation for this class was generated from the following file:
- /Users/barrand/private/dev/softinex/old/inexlib-1.2/inlib/inlib/lut