Loading...
Searching...
No Matches
QuickIndex Class Reference
Inheritance diagram for QuickIndex:
[legend]
Collaboration diagram for QuickIndex:
[legend]

## Public Member Functions

| QuickIndex (const IntArray &source_data)
| QuickIndex (const StringArray &source_data)
| QuickIndex (const Vector &source_data)
void | Index (const IntArray &source_data)
void | Index (const StringArray &source_data)
void | Index (const Vector &source_data)
void | IndexCounts (const StringIntMap &source_data)
void | IndexCounts (const StringIntHash &source_data)
Public Member Functions inherited from IntArray
| IntArray (int start_size=0)
| IntArray (const IntArray &source)
IntArray & | operator= (const IntArray &rhs)
int & | operator[] (int index)
int | operator[] (int index) const
int & | operator[] (char index)
int | operator[] (char index) const
int & | operator[] (double fraction)
int | operator[] (double fraction) const
int | Append (int value)
int | Append (const IntArray &rhs)
void | Push (int value)
int | Pop ()
int | Peek () const
int & | Last () const
void | PushIfNew (int value)
int | Delete (int index)
void | InsertAt (int index, int value)
int | Find (int value) const
int | FastFind (int value) const
int | BinarySearch (int value) const
void | Sort ()
void | Sort (IntArray &freeRider)
void | Zero ()
void | Set (int value)
void | SetSequence (int start=0, int increment=1)
int | Length () const
void | Dimension (int new_count)
void | Clear ()
int | Sum () const
int | Sum (int start) const
int | Sum (int start, int end) const
double | dSum () const
double | dSum (int start) const
double | dSum (int start, int end) const
int | SumProduct (const IntArray &weight) const
double | dSumProduct (const IntArray &weight) const
int | Max () const
int | Max (int start) const
int | Max (int start, int end) const
int | Min () const
int | Min (int start) const
int | Min (int start, int end) const
int | Count () const
int | CountIfGreater (int treshold) const
int | CountIfGreaterOrEqual (int treshold) const
void | Swap (int i, int j)
void | Reverse ()
| operator int * ()
void | Add (int term)
void | Subtract (int term)
void | Multiply (int factor)
void | Divide (int denominator)
void | Add (const IntArray &rhs)
IntArray & | operator+= (int rhs)
IntArray & | operator+= (const IntArray &rhs)
IntArray & | operator*= (int rhs)
IntArray & | operator-= (int rhs)
IntArray & | operator/= (int rhs)
int | InnerProduct (IntArray &v)
bool | operator== (const IntArray &rhs) const
bool | operator!= (const IntArray &rhs) const
bool | isAscending ()
bool | isDescending ()
void | Stack (const IntArray &rhs)
void | Swap (IntArray &rhs)
void | Print ()
void | Print (const char *label)
void | Print (FILE *output)
void | Print (FILE *output, const char *label)
int | Product ()
double | DoubleProduct ()
int | Hash (int initval=0)

## Additional Inherited Members

Static Public Attributes inherited from IntArray
static int | alloc = 4

## Detailed Description

Definition at line 27 of file QuickIndex.h.

## Constructor & Destructor Documentation

## QuickIndex() [1/4]

QuickIndex::QuickIndex | ( |  | ) |

Definition at line 26 of file QuickIndex.cpp.

{
source = NULL;
datatype = __QI_INVALID;
}

## QuickIndex() [2/4]

QuickIndex::QuickIndex | ( | const IntArray & | source_data | ) |

inline

Definition at line 31 of file QuickIndex.h.

{
Index(source_data);
}

## QuickIndex() [3/4]

QuickIndex::QuickIndex | ( | const StringArray & | source_data | ) |

inline

Definition at line 35 of file QuickIndex.h.

{
Index(source_data);
}

## QuickIndex() [4/4]

QuickIndex::QuickIndex | ( | const Vector & | source_data | ) |

inline

Definition at line 39 of file QuickIndex.h.

{
Index(source_data);
}

## Member Function Documentation

## Index() [1/3]

void QuickIndex::Index | ( | const IntArray & | source_data | ) |

Definition at line 32 of file QuickIndex.cpp.

{
source = (const void *) &source_data;
datatype = __QI_INTARRAY;
Dimension(source_data.Length());
SetSequence();
Sort();
}

## Index() [2/3]

void QuickIndex::Index | ( | const StringArray & | source_data | ) |

Definition at line 52 of file QuickIndex.cpp.

{
source = (const void *) &source_data;
datatype = __QI_STRINGARRAY;
Dimension(source_data.Length());
SetSequence();
Sort();
}

## Index() [3/3]

void QuickIndex::Index | ( | const Vector & | source_data | ) |

Definition at line 42 of file QuickIndex.cpp.

{
source = (const void *) &source_data;
datatype = __QI_VECTOR;
Dimension(source_data.Length());
SetSequence();
Sort();
}

## IndexCounts() [1/2]

void QuickIndex::IndexCounts | ( | const StringIntHash & | source_data | ) |

Definition at line 72 of file QuickIndex.cpp.

{
IntArray counts(source_data.Capacity());
for (int i = 0; i < source_data.Capacity(); i++)
if (source_data.SlotInUse(i))
counts[i] = source_data.Integer(i);
else
counts[i] = -1;
Index(counts);
Reverse();
Dimension(source_data.Entries());
Reverse();
}
IntArray
Definition IntArray.h:24

## IndexCounts() [2/2]

void QuickIndex::IndexCounts | ( | const StringIntMap & | source_data | ) |

Definition at line 62 of file QuickIndex.cpp.

{
IntArray counts(source_data.Length());
for (int i = 0; i < source_data.Length(); i++)
counts[i] = source_data.GetCount(i);
Index(counts);
}

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

- general/QuickIndex.h
- general/QuickIndex.cpp