TBCI Numerical high perf. C++ Library  2.8.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
nsList< T, S > Class Template Reference

A numerically sortable List. More...

#include <list.h>

Inheritance diagram for nsList< T, S >:
Inheritance graph
[legend]
Collaboration diagram for nsList< T, S >:
Collaboration graph
[legend]

Public Member Functions

 nsList ()
 
void qsort (bool=false)
 Quicksort is really quick: sorts 1 000 000 records (int) in less than 50 secs on a 486DX4/100 under Linux (32 MB Ram) More...
 
Tsortin_r (T &, bool=false)
 
long move_window (const S &val) const
 
- Public Member Functions inherited from List< T >
 List ()
 
 List (const List< T > &)
 
List< T > & operator= (const List< T > &)
 
List< T > & alias (const List< T > &)
 
iterator begin () const
 
iterator end () const
 
riterator rbegin () const
 
riterator rend () const
 
Tappend ()
 
Tappend (T *)
 
void erase (T *)
 
void deltree (T *)
 Deletes List from item to end. More...
 
void deltree ()
 
 ~List ()
 
Tgetfirst () const
 
Tgetlast () const
 
Tgetcurr () const
 
Tgetnext () const
 
Tgetprev () const
 
Tsetfirst () const
 
Tsetlast () const
 
Tsetnext () const
 
Tsetprev () const
 
Tinscurr ()
 
Tinscurr (T *)
 
Tdelcurr ()
 
Tdetachcurr ()
 
unsigned long getlength () const
 
unsigned long size () const
 
unsigned long getcurrnr () const
 Note that the numbers are 1-based. More...
 
unsigned long getnr (const T *) const
 
unsigned long getnr () const
 
Tgetbynr (long) const
 
Tsetcurrnr (const unsigned long) const
 
Tsetcurr (const T *rec) const
 
void dumpList () const
 

Protected Member Functions

void quick (ListItem< T > *, ListItem< T > *)
 
- Protected Member Functions inherited from List< T >
void checklast ()
 
ListItem< T > * app ()
 

Protected Attributes

bool dir
 
- Protected Attributes inherited from List< T >
ListItem< T > * curr
 
unsigned long count
 
unsigned long currnr
 
unsigned long vers
 
ListItem< T > * root
 
ListItem< T > * last
 
ListItem< T > * detached
 

Additional Inherited Members

- Public Types inherited from List< T >
typedef ListIterator< Titerator
 
typedef ListRIterator< Triterator
 

Detailed Description

template<typename T, typename S = double>
class nsList< T, S >

A numerically sortable List.

ListItems have to def. a member function getval() which returns the value which is used to sort

Definition at line 770 of file list.h.

Constructor & Destructor Documentation

template<typename T , typename S = double>
nsList< T, S >::nsList ( )
inline

Definition at line 781 of file list.h.

References nsList< T, S >::dir.

Member Function Documentation

template<typename T , typename S >
long nsList< T, S >::move_window ( const S &  val) const

Definition at line 922 of file list.h.

References ListItem< T >::data, ListItem< T >::next, and ListItem< T >::prev.

template<typename T , typename S >
void nsList< T, S >::qsort ( bool  desc = false)

Quicksort is really quick: sorts 1 000 000 records (int) in less than 50 secs on a 486DX4/100 under Linux (32 MB Ram)

Definition at line 854 of file list.h.

References NULL.

template<typename T , typename S >
void nsList< T, S >::quick ( ListItem< T > *  left,
ListItem< T > *  right 
)
protected

Definition at line 788 of file list.h.

References ListItem< T >::data, ListItem< T >::next, ListItem< T >::prev, right, and T.

template<class T , class S >
T * nsList< T, S >::sortin_r ( T dat,
bool  frst = false 
)

Definition at line 863 of file list.h.

References ListItem< T >::data, ListItem< T >::next, NULL, ListItem< T >::prev, and STD__.

Member Data Documentation

template<typename T , typename S = double>
bool nsList< T, S >::dir
protected

Definition at line 778 of file list.h.

Referenced by nsList< T, S >::nsList().


The documentation for this class was generated from the following file: