OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Member Functions | Private Attributes | List of all members
MultiRadixCounter Class Reference

#include <newmatap.h>

Public Member Functions

 MultiRadixCounter (int nx, const SimpleIntArray &rx, SimpleIntArray &vx)
 
void operator++ ()
 
bool Swap () const
 
bool Finish () const
 
int Reverse () const
 
int Counter () const
 

Private Attributes

const SimpleIntArrayRadix
 
SimpleIntArrayValue
 
const int n
 
int reverse
 
int product
 
int counter
 
bool finish
 

Detailed Description

Definition at line 159 of file newmatap.h.

Constructor & Destructor Documentation

◆ MultiRadixCounter()

MultiRadixCounter::MultiRadixCounter ( int  nx,
const SimpleIntArray rx,
SimpleIntArray vx 
)

Definition at line 1015 of file newfft.cpp.

References n, product, Radix, REPORT, and Value.

1017  : Radix(rx), Value(vx), n(nx), reverse(0),
1018  product(1), counter(0), finish(false)
1019 {
1020  REPORT for (int k = 0; k < n; k++) { Value[k] = 0; product *= Radix[k]; }
1021 }
const SimpleIntArray & Radix
Definition: newmatap.h:161
const int n
Definition: newmatap.h:165
SimpleIntArray & Value
Definition: newmatap.h:164
#define REPORT
Definition: newfft.cpp:108

Member Function Documentation

◆ Counter()

int MultiRadixCounter::Counter ( ) const
inline

Definition at line 177 of file newmatap.h.

177 { return counter; }

◆ Finish()

bool MultiRadixCounter::Finish ( ) const
inline

Definition at line 175 of file newmatap.h.

175 { return finish; }

◆ operator++()

void MultiRadixCounter::operator++ ( )

Definition at line 1023 of file newfft.cpp.

References counter, finish, n, product, Radix, REPORT, reverse, and Value.

1024 {
1025  REPORT
1026  counter++; int p = product;
1027  for (int k = 0; k < n; k++)
1028  {
1029  Value[k]++; int p1 = p / Radix[k]; reverse += p1;
1030  if (Value[k] == Radix[k]) { REPORT Value[k] = 0; reverse -= p; p = p1; }
1031  else { REPORT return; }
1032  }
1033  finish = true;
1034 }
const SimpleIntArray & Radix
Definition: newmatap.h:161
const int n
Definition: newmatap.h:165
SimpleIntArray & Value
Definition: newmatap.h:164
#define REPORT
Definition: newfft.cpp:108

◆ Reverse()

int MultiRadixCounter::Reverse ( ) const
inline

Definition at line 176 of file newmatap.h.

176 { return reverse; }

◆ Swap()

bool MultiRadixCounter::Swap ( ) const
inline

Definition at line 174 of file newmatap.h.

174 { return reverse < counter; }

Member Data Documentation

◆ counter

int MultiRadixCounter::counter
private

Definition at line 168 of file newmatap.h.

Referenced by operator++().

◆ finish

bool MultiRadixCounter::finish
private

Definition at line 169 of file newmatap.h.

Referenced by operator++().

◆ n

const int MultiRadixCounter::n
private

Definition at line 165 of file newmatap.h.

Referenced by MultiRadixCounter(), and operator++().

◆ product

int MultiRadixCounter::product
private

Definition at line 167 of file newmatap.h.

Referenced by MultiRadixCounter(), and operator++().

◆ Radix

const SimpleIntArray& MultiRadixCounter::Radix
private

Definition at line 161 of file newmatap.h.

Referenced by MultiRadixCounter(), and operator++().

◆ reverse

int MultiRadixCounter::reverse
private

Definition at line 166 of file newmatap.h.

Referenced by operator++().

◆ Value

SimpleIntArray& MultiRadixCounter::Value
private

Definition at line 164 of file newmatap.h.

Referenced by MultiRadixCounter(), and operator++().


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