nCenterFocus::Frommer< TFrommerDefs, variant > Class Template Reference
[Frommer Algorithm]

Implemets the Frommer algorithm. More...

#include <frommer.h>

Collaboration diagram for nCenterFocus::Frommer< TFrommerDefs, variant >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef TFrommerDefs::RingType TRing
typedef TFrommerDefs::RingType RingType
typedef TFrommerDefs::PolynomXYType TPolynomXY
typedef TFrommerDefs::TMatrixXYType TMatrixXYType

Public Member Functions

 Frommer (short m, const TRing *rr)
virtual ~Frommer ()
void perform_generic_C_Step ()
void printStageTimings (std::ostream &os) const
void setName (std::string name)
template<int depth, int stage>
void perform_inner_C_Step_differ_stages (register const short j, register const short l, register short n)
setup

void setPolynoms (const TPolynomXY *const minusP_polynom, const TPolynomXY *const Q_polynom)
 initializes p , q, and calls init()
start algorithm

void doit (int bComputeAllFocalValues, int jacobi=false)
 computes either all (getMaxFocalValuesToCompute) or first vanisched focal Values + 1. Dont' forget to call setPolynoms() first!
template<int hm>
void doitx (short howMany)
 Computes first 'howMany' focal values. Dont' forget to call setPolynoms() first!
get

const TRinggetRing () const
const TRinggetRingRef () const
TRing::ElementType getFocalValue (int pos) const
 get the i-th focal value, (i=pos and smallest i is 1)
void getComputedFocalValues (vector< typename TRing::ElementType > &computedFV) const
short getSuccessiveVanishedFocalValuesCount () const
 get the count number of the first vanished constant coefficients of focal values. note The result maybe useless, if this function is called after doit2() (and you are interested in doit()-results )!
short getMaxFocalValuesToCompute () const
short getComputedFocalValuesNum () const

Protected Member Functions

template<class TemplateMatrix >
void outputMatrix (TemplateMatrix *mat) const
 for debugging:
void outputMatrices () const
 for debugging:
init

void init ()
 initialise matrices A, B, dxA and dyA
TRing::ScalarType * createLowATable ()
 berechnet eine Hilfsvariable fuer den geraden A-Schritt,
siehe klein a in http://www.uni-bayreuth.de/departments/math/org/mathe6/publ/da/hoehn/node14.html
void printLowATable (typename TRing::ScalarType *aTable)
frommer

void compute_dyA_and_dxA ()
 computes dyA, dxA, of A-monoms with MonomDegree = 'currentDegree-1' see http://www.uni-bayreuth.de/departments/math/org/mathe6/publ/da/hoehn/node7.html#frommer_verfahren
void perform_C_Step ()
 C-Step
see http://www.uni-bayreuth.de/departments/math/org/mathe6/publ/da/hoehn/node11.html.
void perform_inner_C_Step (const short j, const short, register short n)
template<int depth, int stage>
void perform_C_Step_differ_stages ()
 Template version eingefuehrt, um Stufenvorkommen zu Zählen und Dauer zu messen.
template<int depth>
void perform_C_Step_wrapper (const int stage)
template<int depth, int stage>
void perform_inner_C_Step_differ_stages (const short j, const short, register short n)
void perform_the_A_Step ()
 the A-Step in frommer algorithm,
see http://www.uni-bayreuth.de/departments/math/org/mathe6/publ/da/hoehn/node12.html
void perform_the_even_A_Step ()
 the A-Step in frommer algorithm,
see http://www.uni-bayreuth.de/departments/math/org/mathe6/publ/da/hoehn/node12.html
void perform_the_odd_A_Step ()
 the A-Step in frommer algorithm,
see http://www.uni-bayreuth.de/departments/math/org/mathe6/publ/da/hoehn/node12.html

Private Attributes

std::string name_m
short int lastDegree
 Speicheranforderungen und Initialisierungen sind extrem teuer, deswegen
1. merke bei einem Algorithmusdurchgang den maximal augetretenen Grad,
2. führe bei einem neuen Durchgang keine neue Speicherreservierung durch, 3. sondern inialisiere nur den verwendeten Speicherbereich neu, siehe init().
const TRing *const ring
 Der Ring.
const RingType::FieldType & field_ref_m
short maxFocalValuesToCompute
short maxDegree
TPolynomXY const * q
 Pointer af ein Q-Polynom.
TPolynomXY const * minusp
 Variable fuer das negierte p-Polynom im Frommer-Algorithmus,.
TMatrixXYType *const A
TMatrixXYType *const B
TMatrixXYType *const dxA
TMatrixXYType *const dyA
const TRing::ScalarType * a_table
short currentDegree
short currFocalValuePos
TRing::ElementType * computedFocalValues

Detailed Description

template<class TFrommerDefs, int variant>
class nCenterFocus::Frommer< TFrommerDefs, variant >

Todo:

add Files to groupdefs

Sicherheitschecks durchführen um falsche Verwendung zu verhindern! was kann man den hier falsch verwenden?

*

Todo:
OPTIONAL: IFrommer-Interface definieren (keine Vererbung! ). Du weisst ja, wo du die Technik findest.

Diese Klasse funktioniert mit folgenden Datentypen: TPolynomXY=fast_polynomXY und basicNumber, number_eps1 oder number_eps0 als TNum-Datentyp, oder mit TPolynomXY=polynom und zahl (siehe basicNumber.h) als TNum-Datentyp. TRing Kann eine Ring ueber einem endlichen Koerper sein ( eps_ring.h und fast_Ring.h)

Todo:
Testfunktionen schreiben! Fuer den Testdurchlauf sollte ein Ring und einer Frommer-Objekt definiert werden, welche SAFE-Routinen aufrufen?

Definition at line 53 of file frommer.h.


Member Typedef Documentation

template<class TFrommerDefs , int variant>
typedef TFrommerDefs::RingType nCenterFocus::Frommer< TFrommerDefs, variant >::RingType

Definition at line 71 of file frommer.h.

template<class TFrommerDefs , int variant>
typedef TFrommerDefs::TMatrixXYType nCenterFocus::Frommer< TFrommerDefs, variant >::TMatrixXYType

Definition at line 74 of file frommer.h.

template<class TFrommerDefs , int variant>
typedef TFrommerDefs::PolynomXYType nCenterFocus::Frommer< TFrommerDefs, variant >::TPolynomXY

Definition at line 73 of file frommer.h.

template<class TFrommerDefs , int variant>
typedef TFrommerDefs::RingType nCenterFocus::Frommer< TFrommerDefs, variant >::TRing

Definition at line 69 of file frommer.h.


Constructor & Destructor Documentation

template<class TFrommerDefs , int variant>
nCenterFocus::Frommer< TFrommerDefs, variant >::Frommer ( short  m,
const TRing _ring 
) [inline]
template<class TFrommerDefs , int variant>
nCenterFocus::Frommer< TFrommerDefs, variant >::~Frommer (  )  [inline, virtual]

Member Function Documentation

template<class TFrommerDefs , int variant>
void nCenterFocus::Frommer< TFrommerDefs, variant >::compute_dyA_and_dxA (  )  [inline, protected]
template<class TFrommerDefs , int variant>
TFrommerDefs::RingType::ScalarType * nCenterFocus::Frommer< TFrommerDefs, variant >::createLowATable (  )  [inline, protected]

berechnet eine Hilfsvariable fuer den geraden A-Schritt, welche wiederverwendet werden kann.
Siehe http://www.uni-bayreuth.de/departments/math/org/mathe6/publ/da/hoehn/node14.html

Definition at line 113 of file frommer.cpp.

References nCenterFocus::Frommer< TFrommerDefs, variant >::field_ref_m.

template<class TFrommerDefs , int variant>
void nCenterFocus::Frommer< TFrommerDefs, variant >::doit ( int  bComputeAllFocalValues,
int  jacobi = false 
) [inline]
template<class TFrommerDefs , int variant>
template<int hm>
void nCenterFocus::Frommer< TFrommerDefs, variant >::doitx ( short  howMany  )  [inline]

computes only 'ValuesToCompute' focal values! Dont' forget to call setPolynoms() first!

Todo:
: doitx könnte die Funktion doit vollkommen ersetzen - man muss nur angeben, wieviel Strudelgrößen man denn nun berechnen will. die Frage ist, ob der doitx -Aufruf genau so schnell ist, wie doit().
Todo:
soll man nicht bei MaxFocalValuesToCompute aufhören
Precondition:
die Polynome p und q muessen die richtige EpsPrecision haben. Die Voraussetzung kommt bei der Multiplikation im EpsRing zum tragen und wird im Safe-Modus geprüft.
Todo:
soll man nicht bei MaxFocalValuesToCompute aufhören
Precondition:
die Polynome p und q muessen die richtige EpsPrecision haben. Die Voraussetzung kommt bei der Multiplikation im EpsRing zum tragen und wird im Safe-Modus geprüft.

Definition at line 820 of file frommer.cpp.

References nCenterFocus::Frommer< TFrommerDefs, variant >::A, nCenterFocus::Frommer< TFrommerDefs, variant >::B, nCenterFocus::Frommer< TFrommerDefs, variant >::compute_dyA_and_dxA(), nCenterFocus::Frommer< TFrommerDefs, variant >::computedFocalValues, nCenterFocus::Frommer< TFrommerDefs, variant >::currentDegree, nCenterFocus::Frommer< TFrommerDefs, variant >::currFocalValuePos, nCenterFocus::Frommer< TFrommerDefs, variant >::init(), nCenterFocus::Frommer< TFrommerDefs, variant >::lastDegree, nCenterFocus::Frommer< TFrommerDefs, variant >::perform_C_Step(), nCenterFocus::Frommer< TFrommerDefs, variant >::perform_the_A_Step(), and nCenterFocus::Frommer< TFrommerDefs, variant >::ring.

Here is the call graph for this function:

template<class TFrommerDefs , int variant>
void nCenterFocus::Frommer< TFrommerDefs, variant >::getComputedFocalValues ( vector< typename TRing::ElementType > &  computedFV  )  const [inline]
template<class TFrommerDefs , int variant>
short nCenterFocus::Frommer< TFrommerDefs, variant >::getComputedFocalValuesNum (  )  const [inline]
template<class TFrommerDefs , int variant>
TFrommerDefs::RingType::ElementType nCenterFocus::Frommer< TFrommerDefs, variant >::getFocalValue ( int  pos  )  const [inline]

liefert die i-te Strudelgroesse, i=pos startet bei 1.

Note:
die Anzahl der berechneten Strudelgroessen ist currFocalValuePos-1; /
Todo:
getchar ersetzen durch globalPause, und dann in globalPause getChar aktivieren oder deaktivieren.

liefert die i-te Strudelgroesse, i=pos startet bei 1.

Note:
die Anzahl der berechneten Strudelgroessen ist currFocalValuePos-1; /
Todo:
getchar ersetzen durch globalPause, und dann in globalPause getChar aktivieren oder deaktivieren.

Definition at line 1130 of file frommer.cpp.

References nCenterFocus::Frommer< TFrommerDefs, variant >::computedFocalValues, nCenterFocus::Frommer< TFrommerDefs, variant >::currFocalValuePos, and nCenterFocus::Frommer< TFrommerDefs, variant >::maxFocalValuesToCompute.

template<class TFrommerDefs , int variant>
short nCenterFocus::Frommer< TFrommerDefs, variant >::getMaxFocalValuesToCompute (  )  const [inline]
template<class TFrommerDefs , int variant>
const TFrommerDefs::RingType * nCenterFocus::Frommer< TFrommerDefs, variant >::getRing (  )  const [inline]

Definition at line 8 of file frommer.cpp.

References nCenterFocus::Frommer< TFrommerDefs, variant >::ring.

template<class TFrommerDefs , int variant>
const TFrommerDefs::RingType & nCenterFocus::Frommer< TFrommerDefs, variant >::getRingRef (  )  const [inline]

Definition at line 14 of file frommer.cpp.

References nCenterFocus::Frommer< TFrommerDefs, variant >::ring.

template<class TFrommerDefs , int variant>
short nCenterFocus::Frommer< TFrommerDefs, variant >::getSuccessiveVanishedFocalValuesCount (  )  const [inline]
template<class TFrommerDefs , int variant>
void nCenterFocus::Frommer< TFrommerDefs, variant >::init (  )  [inline, protected]
template<class TFrommerDefs , int variant>
void nCenterFocus::Frommer< TFrommerDefs, variant >::outputMatrices (  )  const [inline, protected]
template<class TFrommerDefs , int variant>
template<class TemplateMatrix >
void nCenterFocus::Frommer< TFrommerDefs, variant >::outputMatrix ( TemplateMatrix *  mat  )  const [inline, protected]
template<class TFrommerDefs , int variant>
void nCenterFocus::Frommer< TFrommerDefs, variant >::perform_C_Step (  )  [inline, protected]
template<class TFrommerDefs , int variant>
template<int depth, int stage>
void nCenterFocus::Frommer< TFrommerDefs, variant >::perform_C_Step_differ_stages (  )  [inline, protected]
template<class TFrommerDefs , int variant>
template<int depth>
void nCenterFocus::Frommer< TFrommerDefs, variant >::perform_C_Step_wrapper ( const int  stage  )  [inline, protected]
Note:
irgendwie funktioniert der Ansatz zum protokollieren so noch nicht richtig. - Die gprof -Ausgabe ist nicht Idee1: doit bekommt einen zweiten Template-Parameter (epsPrecision?) Idee2: jedes Frommer-Objekt zählt die Aufrufe getrennt.

Definition at line 894 of file frommer.cpp.

References nCenterFocus::Frommer< TFrommerDefs, variant >::perform_C_Step().

Here is the call graph for this function:

template<class TFrommerDefs , int variant>
void nCenterFocus::Frommer< TFrommerDefs, variant >::perform_generic_C_Step (  )  [inline]
Todo:
Test fuer die Allgemeine Implementierung fehlte - Fehler wurde nur gefunden, weil case2 rausgenommen wurde.
Note:
achtung: hier wird alles anders durchlaufen als in fast_frommer!!!
Todo:
Test fuer die Allgemeine Implementierung fehlte - Fehler wurde nur gefunden, weil case2 rausgenommen wurde.
Note:
achtung: hier wird alles anders durchlaufen als in fast_frommer!!!

Definition at line 492 of file frommer.cpp.

References nCenterFocus::Frommer< TFrommerDefs, variant >::B, nCenterFocus::Frommer< TFrommerDefs, variant >::currentDegree, nCenterFocus::Frommer< TFrommerDefs, variant >::outputMatrix(), nCenterFocus::Frommer< TFrommerDefs, variant >::perform_inner_C_Step(), and nCenterFocus::Frommer< TFrommerDefs, variant >::q.

Referenced by nCenterFocus::Frommer< TFrommerDefs, variant >::perform_C_Step(), and nCenterFocus::Frommer< TFrommerDefs, variant >::perform_C_Step_differ_stages().

Here is the call graph for this function:

template<class TFrommerDefs , int variant>
void nCenterFocus::Frommer< TFrommerDefs, variant >::perform_inner_C_Step ( const short  j,
const   short,
register short  n 
) [inline, protected]
template<class TFrommerDefs , int variant>
template<int depth, int stage>
void nCenterFocus::Frommer< TFrommerDefs, variant >::perform_inner_C_Step_differ_stages ( register const short  j,
register const short  l,
register short  n 
) [inline]

Referenz notwendig wegen dem Liften TODO: schauen, wieviel der "normale" Algorithmus an Performance verliert...

Referenz notwendig wegen dem Liften TODO: schauen, wieviel der "normale" Algorithmus an Performance verliert...

Definition at line 346 of file frommer.cpp.

References nCenterFocus::Frommer< TFrommerDefs, variant >::B, nCenterFocus::Frommer< TFrommerDefs, variant >::currentDegree, nCenterFocus::Frommer< TFrommerDefs, variant >::dxA, nCenterFocus::Frommer< TFrommerDefs, variant >::dyA, nCenterFocus::Frommer< TFrommerDefs, variant >::minusp, nCenterFocus::Frommer< TFrommerDefs, variant >::q, and nCenterFocus::Frommer< TFrommerDefs, variant >::ring.

template<class TFrommerDefs , int variant>
template<int depth, int stage>
void nCenterFocus::Frommer< TFrommerDefs, variant >::perform_inner_C_Step_differ_stages ( const short  j,
const   short,
register short  n 
) [inline, protected]
template<class TFrommerDefs , int variant>
void nCenterFocus::Frommer< TFrommerDefs, variant >::perform_the_A_Step (  )  [inline, protected]
template<class TFrommerDefs , int variant>
void nCenterFocus::Frommer< TFrommerDefs, variant >::perform_the_even_A_Step (  )  [inline, protected]
template<class TFrommerDefs , int variant>
void nCenterFocus::Frommer< TFrommerDefs, variant >::perform_the_odd_A_Step (  )  [inline, protected]

der A-Schritt des Frommer-Algorithmus.
siehe http://www.uni-bayreuth.de/departments/math/org/mathe6/publ/da/hoehn/node12.html

Todo:
moegliche Optimierung: statt inverse nachzuschlagen und mit (n-j+2) zu multiplizieren könnte man eine extra tabelle fuer skalar mal inverse anlegen. Das gleiche gilt fuer Subtraktion.

der A-Schritt des Frommer-Algorithmus.
siehe http://www.uni-bayreuth.de/departments/math/org/mathe6/publ/da/hoehn/node12.html

Todo:
moegliche Optimierung: statt inverse nachzuschlagen und mit (n-j+2) zu multiplizieren könnte man eine extra tabelle fuer skalar mal inverse anlegen. Das gleiche gilt fuer Subtraktion.

Definition at line 639 of file frommer.cpp.

References nCenterFocus::Frommer< TFrommerDefs, variant >::A, nCenterFocus::Frommer< TFrommerDefs, variant >::B, nCenterFocus::Frommer< TFrommerDefs, variant >::currentDegree, nCenterFocus::Frommer< TFrommerDefs, variant >::field_ref_m, and nCenterFocus::Frommer< TFrommerDefs, variant >::ring.

Referenced by nCenterFocus::Frommer< TFrommerDefs, variant >::perform_the_A_Step().

template<class TFrommerDefs , int variant>
void nCenterFocus::Frommer< TFrommerDefs, variant >::printLowATable ( typename TRing::ScalarType *  aTable  )  [protected]
template<class TFrommerDefs , int variant>
void nCenterFocus::Frommer< TFrommerDefs, variant >::printStageTimings ( std::ostream &  os  )  const [inline]
Todo:

s10 symbolisch berechnen

membervariable "Name" vergeben!

nicht nur die Zeit messen, sondern auch die Anzahl der Aufrufe zählen

Todo:

s10 symbolisch berechnen

membervariable "Name" vergeben!

nicht nur die Zeit messen, sondern auch die Anzahl der Aufrufe zählen

Definition at line 1180 of file frommer.cpp.

References nCenterFocus::Frommer< TFrommerDefs, variant >::name_m.

template<class TFrommerDefs , int variant>
void nCenterFocus::Frommer< TFrommerDefs, variant >::setName ( std::string  name  )  [inline]

Definition at line 214 of file frommer.h.

References nCenterFocus::Frommer< TFrommerDefs, variant >::name_m.

template<class TFrommerDefs , int variant>
void nCenterFocus::Frommer< TFrommerDefs, variant >::setPolynoms ( const TPolynomXY *const   minuspp,
const TPolynomXY *const   qq 
) [inline]

Die vom Frommer-Algoritmus zu Untersuchenden Funktionen werden als Parameter uebergeben. Das Q-Polynom wird unveraendert beibehalten, und minusP-Polynom ebenfalls!

Note:
statt dem Polynom P wird das negierte (-P) generiert - das spart Umwandlungszeit!
delete computedFocalValues is not nessecary, they are overwritten later!
Todo:

eventuell setPolynoms() streichen und die Polynome als 'doit'-Parameter aufnehmen.

das Problem ( minusp->getDegree() != qq->getDegree() ); loesen

Die vom Frommer-Algoritmus zu Untersuchenden Funktionen werden als Parameter uebergeben. Das Q-Polynom wird unveraendert beibehalten, und minusP-Polynom ebenfalls!

Note:
statt dem Polynom P wird das negierte (-P) generiert - das spart Umwandlungszeit!
delete computedFocalValues is not nessecary, they are overwritten later!
Todo:

eventuell setPolynoms() streichen und die Polynome als 'doit'-Parameter aufnehmen.

das Problem ( minusp->getDegree() != qq->getDegree() ); loesen

Definition at line 199 of file frommer.cpp.

References nCenterFocus::Frommer< TFrommerDefs, variant >::currFocalValuePos, nCenterFocus::Frommer< TFrommerDefs, variant >::minusp, and nCenterFocus::Frommer< TFrommerDefs, variant >::q.


Member Data Documentation

template<class TFrommerDefs , int variant>
TMatrixXYType* const nCenterFocus::Frommer< TFrommerDefs, variant >::A [private]
template<class TFrommerDefs , int variant>
const TRing::ScalarType* nCenterFocus::Frommer< TFrommerDefs, variant >::a_table [private]

Hilfsvariable fuer den A-Schritt, siehe createLowATable()

Todo:
a_table eventuell Umbenennen

Definition at line 111 of file frommer.h.

Referenced by nCenterFocus::Frommer< TFrommerDefs, variant >::perform_the_even_A_Step(), and nCenterFocus::Frommer< TFrommerDefs, variant >::~Frommer().

template<class TFrommerDefs , int variant>
TMatrixXYType* const nCenterFocus::Frommer< TFrommerDefs, variant >::B [private]
template<class TFrommerDefs , int variant>
TRing::ElementType* nCenterFocus::Frommer< TFrommerDefs, variant >::computedFocalValues [private]
template<class TFrommerDefs , int variant>
short nCenterFocus::Frommer< TFrommerDefs, variant >::currentDegree [private]
template<class TFrommerDefs , int variant>
short nCenterFocus::Frommer< TFrommerDefs, variant >::currFocalValuePos [private]
template<class TFrommerDefs , int variant>
TMatrixXYType* const nCenterFocus::Frommer< TFrommerDefs, variant >::dxA [private]
template<class TFrommerDefs , int variant>
TMatrixXYType* const nCenterFocus::Frommer< TFrommerDefs, variant >::dyA [private]
template<class TFrommerDefs , int variant>
const RingType::FieldType& nCenterFocus::Frommer< TFrommerDefs, variant >::field_ref_m [private]
template<class TFrommerDefs , int variant>
short int nCenterFocus::Frommer< TFrommerDefs, variant >::lastDegree [private]
template<class TFrommerDefs , int variant>
short nCenterFocus::Frommer< TFrommerDefs, variant >::maxDegree [private]

Definition at line 95 of file frommer.h.

Referenced by nCenterFocus::Frommer< TFrommerDefs, variant >::Frommer().

template<class TFrommerDefs , int variant>
short nCenterFocus::Frommer< TFrommerDefs, variant >::maxFocalValuesToCompute [private]
template<class TFrommerDefs , int variant>
TPolynomXY const* nCenterFocus::Frommer< TFrommerDefs, variant >::minusp [private]
template<class TFrommerDefs , int variant>
std::string nCenterFocus::Frommer< TFrommerDefs, variant >::name_m [private]
template<class TFrommerDefs , int variant>
TPolynomXY const* nCenterFocus::Frommer< TFrommerDefs, variant >::q [private]
template<class TFrommerDefs , int variant>
const TRing* const nCenterFocus::Frommer< TFrommerDefs, variant >::ring [private]

The documentation for this class was generated from the following files:
Generated on Tue Nov 23 13:10:53 2010 for centerfocus by  doxygen 1.6.3