#include <cfRandomExperiment.h>
Public Member Functions | |
CFRandomExperiment (CenterFocusExperiment< variant > &cfExperiment, D_CenterfocusParams const *cfparams, TFrommer1 &frommer1, TFrommer2 &frommer2, RankStatistic &fullRankStatistic, RankStatistic &subRankStatistic, LiftAndQuadricsStatistic &fullQuadricsStatistic, LiftAndQuadricsStatistic &subQuadricsStatistic, FailedLiftStatistic &liftStatistic, TPolynomXY &randomMinusP_polynom, TPolynomXY &randomQ_polynom) | |
virtual | ~CFRandomExperiment () |
void | performRandomExperiment () |
performs a single centerfocus experiment/ | |
void | printTimings (std::ostream &os) const |
DStatistic & | getStatisticRef () |
long64 | getCurrentRandomCounter () const |
Private Member Functions | |
list< CoeffListEntry > | initRandomVariablesOrder () |
allsearch experiment part | |
bool | setNextAllCoefficient (TPolynomXY &allMinusP_polynom, TPolynomXY &allQ_polynom) |
random / allsearch experiment part | |
bool | randomExperimentWellDefined () |
void | correctStatistic () |
void | performSingleRandomTrial (const TPolynomXY &randomMinusP_polynom, const TPolynomXY &randomQ_polynom) |
TODO Optimierung: eine KOPIE der Polynome braucht man nur, wenn das ALL-Experiment durchgeführt wird. | |
void | performSingleALLExperiment (TPolynomXY randomMinusP_polynom, TPolynomXY randomQ_polynom) |
void | initRandomCoefficients (TPolynomXY &mp, TPolynomXY &q) |
void | initRandomExperiment () |
initializes 'bUseFormula1_m', 'bUseFormula1_m' and randomMinusP_polynom, randomQ_polynom (from minusP_polynom_m, Q_polynom_m ) | |
void | compute_q_coeff_x_3_y_0 (const TPolynomXY &mp, TPolynomXY &q) |
benoetigt minimum epsPrecision 0, und ring z.Zt passend zu PolynomXY_Type::CoeffType. | |
void | compute_p_coeff_x_3_y_0 (TPolynomXY &minusP_polynom, const TPolynomXY &Q_polynom) |
computes p(3,0) is such way that second focal value vanish (in most cases) | |
Formula23 | |
pair< TPolynomXY, TPolynomXY > | performFormula23Step_construct_v1 () |
v1 : pp_{3,0}=>1,qq_{2,1}=>-3,pp_{1,2}=>-3,qq_{0,3}=>1} , | |
pair< TPolynomXY, TPolynomXY > | performFormula23Step_construct_v2 () |
v2 : qq_{3,0}=>1,pp_{2,1}=>3,qq_{1,2}=>-3,pp_{0,3}=>-1} , | |
TFrommer1::RingType::ScalarType | performFormula23Step_getSecondFocalValue (const pair< TPolynomXY, TPolynomXY > &) const |
TFrommer1::RingType::ScalarType | performFormula23Step_getThirdFocalValue (const pair< TPolynomXY, TPolynomXY > &) const |
void | performFormula23Step_solveQ (unsigned int &solutions, typename TFrommer1::RingType::ScalarType *b) |
solve b[0] + b[1]*x + b[2]*x^2 = 0 | |
void | performFormula23Step (TPolynomXY &minusP_polynom, TPolynomXY &Q_polynom) |
computes monom coefficients in such way, that second and third focal values vanish, if possible. | |
pair< TPolynomXY, TPolynomXY > | performFormula23Step_computePoint (typename TFrommer1::RingType::ScalarType v1coeff, typename TFrommer1::RingType::ScalarType v2coeff, const pair< const TPolynomXY, const TPolynomXY > &PQpolynoms) const |
returns PQpolynoms + v1coeff*v1_m + v2coeff* v2_m | |
void | performFormula23Step_computePointNew (typename TFrommer1::RingType::ScalarType v1coeff, typename TFrommer1::RingType::ScalarType v2coeff, const pair< const TPolynomXY, const TPolynomXY > &PQPolynomPair, pair< TPolynomXY, TPolynomXY > &ret) const |
Private Attributes | |
TFrommer1::RingType::ScalarType | drittel_m |
TFrommer1::RingType::ScalarType | zwei_m |
D_CenterfocusParams const * | cfparams_m |
CenterFocusExperiment< variant > & | cfExperiment_m |
TFrommer1 & | frommer1_m |
TFrommer2 & | frommer2_m |
TPolynomXY & | randomMinusP_polynom_m |
TPolynomXY & | randomQ_polynom_m |
TFrommer1::RingType const & | f1_ring_ref_m |
TFrommer2::RingType const & | f2_ring_ref_m |
TFrommer1::RingType::FieldType const & | frommer1_field_ref |
const PolynomialRing < TPolynomXY, typename TFrommer1::RingType > | polynomialRing_m |
DStatistic * | st_m |
RankStatistic & | fullRankStatistic_m |
RankStatistic & | subRankStatistic_m |
LiftAndQuadricsStatistic & | fullQuadricsStatistic_m |
LiftAndQuadricsStatistic & | subQuadricsStatistic_m |
FailedLiftStatistic & | liftStatistic_m |
TFrommer1::RingType::ScalarType * | psolutions_m |
pair< TPolynomXY, TPolynomXY > * | pPointSolutions_m |
const list< CoeffListEntry > | coeffRandomVariablesOrder_m |
long64 | randomCounter_m |
Formula23 stuf | |
const pair< TPolynomXY, TPolynomXY > | v1_m |
const pair< TPolynomXY, TPolynomXY > | v2_m |
random experiment data | |
bool | bUseFormula1_m |
compute q(3,0) in a kind that first focal value vanish only if Q_30 is random.and benutzeFormel1 is set | |
bool | bUseFormula2_m |
compute p(3,0) in a kind that second focal value vanish only if P_30 is random. and benutzeFormel2 is set | |
bool | bUseFormula23_m |
compute coefficients in a kind that second and third focal value vanish . First focal value must be vanished! |
eventuell Geschwindigkeitsproblem, da es jetzt neben CenterFocusExperiment auc CFRandomExperiment gibt - zwei objekte, doppelt gespeicherte Variablen...
Definition at line 15 of file cfRandomExperiment.h.
CFRandomExperiment::CFRandomExperiment | ( | CenterFocusExperiment< variant > & | cfExperiment, | |
D_CenterfocusParams const * | cfparams, | |||
TFrommer1 & | frommer1, | |||
TFrommer2 & | frommer2, | |||
RankStatistic & | fullRankStatistic, | |||
RankStatistic & | subRankStatistic, | |||
LiftAndQuadricsStatistic & | fullQuadricsStatistic, | |||
LiftAndQuadricsStatistic & | subQuadricsStatistic, | |||
FailedLiftStatistic & | liftStatistic, | |||
TPolynomXY & | randomMinusP_polynom, | |||
TPolynomXY & | randomQ_polynom | |||
) | [inline] |
Definition at line 11 of file cfRandomExperiment.h.
CFRandomExperiment::~CFRandomExperiment | ( | ) | [inline, virtual] |
Definition at line 1573 of file cfRandomExperiment.h.
void CFRandomExperiment::compute_p_coeff_x_3_y_0 | ( | TPolynomXY & | randomMinusP_polynom, | |
const TPolynomXY & | randomQ_polynom | |||
) | [inline, private] |
benoetigt frommer mit epsPrecision 1, minusP_polynom und Q_polynom z.Zt passend zu frommer, aber im Prinzip waere das egal, es muesste nur eine Konvertierung implementiert werden.
TODO compute_p_coeff_x_3_y_0: Formal korrekt waere: wandle die Polynome P,Q um in solche mit epsPrecision 1 und fuehre dan f2 aus
Definition at line 729 of file cfRandomExperiment.h.
void CFRandomExperiment::compute_q_coeff_x_3_y_0 | ( | const TPolynomXY & | minusP_polynom, | |
TPolynomXY & | Q_polynom | |||
) | [inline, private] |
Formel 1 computes q(3,0) in such way that first focal value vanish !
Formel 1 berechnet q(3,0) so, dass die erste Strudelgroesse 0 ist!
q(3,0) = - 1/3*mp(2,0)*mp(1,1) .
mp | negative p polynom | |
q | q polynom |
Definition at line 639 of file cfRandomExperiment.h.
void CFRandomExperiment::correctStatistic | ( | ) | [inline, private] |
Definition at line 422 of file cfRandomExperiment.h.
long64 nCenterFocus::CFRandomExperiment< variant, TPolynomXY, TFrommer1, TFrommer2 >::getCurrentRandomCounter | ( | ) | const [inline] |
Definition at line 128 of file cfRandomExperiment.h.
References nCenterFocus::CFRandomExperiment< variant, TPolynomXY, TFrommer1, TFrommer2 >::randomCounter_m.
DStatistic & CFRandomExperiment::getStatisticRef | ( | ) | [inline] |
Definition at line 222 of file cfRandomExperiment.h.
void CFRandomExperiment::initRandomCoefficients | ( | TPolynomXY & | p, | |
TPolynomXY & | q | |||
) | [inline, private] |
/
/
Definition at line 291 of file cfRandomExperiment.h.
void CFRandomExperiment::initRandomExperiment | ( | ) | [inline, private] |
/
unterscheide zwischen PolynomGrad und hoechster moeglicher Exponent? Fuer z.B. kann ein PolynomObjekt monome mit Grad 3 enthalten / (wurde so z.B. in der Eingabe definiert), aber alle Koeffizienten der Monome mit grad 3 sind 0. Strenggenommen ist also Grad dann 2 (was aber in unserem Programm / von keinem Interesse ist) /
eigentlich ist es Quatsch, den Polynomtyp fuer das Zufallsexperiment offen zu lassen. Es sollte halt TFrommer2::TPolynomXY sein und basta. - Jetzt statt TFrommer2::TPolynomXY TFrommer1::TPolynomXY... /
pointer auf const oder Referenz uebergeben. //
halben pfusch getX().getX() beseitigen. Problem: irgedwo gibt es auch Pfusch nur mit 'getX()' - obwohl nicht notwendig.
Problem: cfparams_m->getPolynomialDegree() muss nicht unbedingt mit cfparams_m->pPoynim konsistent sein (gibt redundanz der Information und somit ein potenzielles konsistenzprpb
Polynome bekommen eine Initialisierungsfunkton mit epsPrecision als parameter, oder diese Klasse bekommt die Initialisierungsfuntion
/
unterscheide zwischen PolynomGrad und hoechster moeglicher Exponent? Fuer z.B. kann ein PolynomObjekt monome mit Grad 3 enthalten / (wurde so z.B. in der Eingabe definiert), aber alle Koeffizienten der Monome mit grad 3 sind 0. Strenggenommen ist also Grad dann 2 (was aber in unserem Programm / von keinem Interesse ist) /
eigentlich ist es Quatsch, den Polynomtyp fuer das Zufallsexperiment offen zu lassen. Es sollte halt TFrommer2::TPolynomXY sein und basta. - Jetzt statt TFrommer2::TPolynomXY TFrommer1::TPolynomXY... /
pointer auf const oder Referenz uebergeben. //
halben pfusch getX().getX() beseitigen. Problem: irgedwo gibt es auch Pfusch nur mit 'getX()' - obwohl nicht notwendig.
Problem: cfparams_m->getPolynomialDegree() muss nicht unbedingt mit cfparams_m->pPoynim konsistent sein (gibt redundanz der Information und somit ein potenzielles konsistenzprpb
Polynome bekommen eine Initialisierungsfunkton mit epsPrecision als parameter, oder diese Klasse bekommt die Initialisierungsfuntion
Definition at line 96 of file cfRandomExperiment.h.
list< CoeffListEntry > CFRandomExperiment::initRandomVariablesOrder | ( | ) | [inline, private] |
endlich den Iterator ueber PQ-Elemente schreiben!
gehoert diese Funktion nicht eventuell in ReadCenterFocusParams?
endlich den Iterator ueber PQ-Elemente schreiben!
gehoert diese Funktion nicht eventuell in ReadCenterFocusParams?
Definition at line 205 of file cfRandomExperiment.h.
void CFRandomExperiment::performFormula23Step | ( | TPolynomXY & | minusP_polynom, | |
TPolynomXY & | Q_polynom | |||
) | [inline, private] |
intern notwendige epsPrecision: 0, aber intern wird performRegularExperiment aufgerufen, welches wiederum Frommer_eps1 benoetigt mindestens fuer die Jacobi-Matrix Berechnung
Frage1: ist die Formel23 für alle Grade oder nur für Grad 3 richtig? Frage2: warum gibt es zwei frommer typen aber nur 1 PolynomXY_Typ ? - alle anderen PolynomXY-Typen gibt es in den frommer-deklarationen. das ist inkonsistent: manchen Funktionen alle Parameter uebergebenm, und manche einfach auf die Member-Variablen zugreifen lassen. uebergebe zumindest solche Parameter, die sich aendern - evt will man auf den Kopien arbeiten. TODO sehr ungeschickt: einsilbige Variablennamen!!!
Frage1: ist die Formel23 für alle Grade oder nur für Grad 3 richtig? Frage2: warum gibt es zwei frommer typen aber nur 1 PolynomXY_Typ ? - alle anderen PolynomXY-Typen gibt es in den frommer-deklarationen. das ist inkonsistent: manchen Funktionen alle Parameter uebergebenm, und manche einfach auf die Member-Variablen zugreifen lassen. uebergebe zumindest solche Parameter, die sich aendern - evt will man auf den Kopien arbeiten. TODO sehr ungeschickt: einsilbige Variablennamen!!!
Definition at line 1064 of file cfRandomExperiment.h.
pair< TPolynomXY, TPolynomXY > CFRandomExperiment::performFormula23Step_computePoint | ( | typename TFrommer1::RingType::ScalarType | v1coeff, | |
typename TFrommer1::RingType::ScalarType | v2coeff, | |||
const pair< const TPolynomXY, const TPolynomXY > & | PQPolynomPair | |||
) | const [inline, private] |
return point + v1coeff*v1_m + v2coeff*v2_m
return point + v1coeff*v1_m + v2coeff*v2_m
Definition at line 910 of file cfRandomExperiment.h.
void CFRandomExperiment::performFormula23Step_computePointNew | ( | typename TFrommer1::RingType::ScalarType | v1coeff, | |
typename TFrommer1::RingType::ScalarType | v2coeff, | |||
const pair< const TPolynomXY, const TPolynomXY > & | PQPolynomPair, | |||
pair< TPolynomXY, TPolynomXY > & | ret | |||
) | const [inline, private] |
Definition at line 931 of file cfRandomExperiment.h.
pair< TPolynomXY, TPolynomXY > CFRandomExperiment::performFormula23Step_construct_v1 | ( | ) | [inline, private] |
Definition at line 229 of file cfRandomExperiment.h.
pair< TPolynomXY, TPolynomXY > CFRandomExperiment::performFormula23Step_construct_v2 | ( | ) | [inline, private] |
Definition at line 257 of file cfRandomExperiment.h.
TFrommer1::RingType::ScalarType CFRandomExperiment::performFormula23Step_getSecondFocalValue | ( | const pair< TPolynomXY, TPolynomXY > & | polynompair | ) | const [inline, private] |
Definition at line 888 of file cfRandomExperiment.h.
TFrommer1::RingType::ScalarType CFRandomExperiment::performFormula23Step_getThirdFocalValue | ( | const pair< TPolynomXY, TPolynomXY > & | polynompair | ) | const [inline, private] |
Definition at line 865 of file cfRandomExperiment.h.
void CFRandomExperiment::performFormula23Step_solveQ | ( | unsigned int & | solutions, | |
typename TFrommer1::RingType::ScalarType * | b | |||
) | [inline, private] |
solve quadratic equation 0 = bb0 + bb1*x + bb2*x^2 optimierungsidee: verwende auch keine liste, sondern ein Array fester groesse = p!
Definition at line 952 of file cfRandomExperiment.h.
void CFRandomExperiment::performSingleALLExperiment | ( | TPolynomXY | randomMinusP_polynom, | |
TPolynomXY | randomQ_polynom | |||
) | [inline, private] |
Definition at line 323 of file cfRandomExperiment.h.
void CFRandomExperiment::performSingleRandomTrial | ( | const TPolynomXY & | randomMinusP_polynom, | |
const TPolynomXY & | randomQ_polynom | |||
) | [inline, private] |
Definition at line 377 of file cfRandomExperiment.h.
void CFRandomExperiment::printTimings | ( | std::ostream & | os | ) | const [inline] |
Definition at line 1547 of file cfRandomExperiment.h.
bool nCenterFocus::CFRandomExperiment< variant, TPolynomXY, TFrommer1, TFrommer2 >::randomExperimentWellDefined | ( | ) | [private] |
bool CFRandomExperiment::setNextAllCoefficient | ( | TPolynomXY & | allMinusP_polynom, | |
TPolynomXY & | allQ_polynom | |||
) | [inline, private] |
Definition at line 563 of file cfRandomExperiment.h.
bool nCenterFocus::CFRandomExperiment< variant, TPolynomXY, TFrommer1, TFrommer2 >::bUseFormula1_m [private] |
Definition at line 91 of file cfRandomExperiment.h.
bool nCenterFocus::CFRandomExperiment< variant, TPolynomXY, TFrommer1, TFrommer2 >::bUseFormula23_m [private] |
Definition at line 95 of file cfRandomExperiment.h.
bool nCenterFocus::CFRandomExperiment< variant, TPolynomXY, TFrommer1, TFrommer2 >::bUseFormula2_m [private] |
Definition at line 93 of file cfRandomExperiment.h.
CenterFocusExperiment<variant>& nCenterFocus::CFRandomExperiment< variant, TPolynomXY, TFrommer1, TFrommer2 >::cfExperiment_m [private] |
Definition at line 50 of file cfRandomExperiment.h.
D_CenterfocusParams const* nCenterFocus::CFRandomExperiment< variant, TPolynomXY, TFrommer1, TFrommer2 >::cfparams_m [private] |
Definition at line 49 of file cfRandomExperiment.h.
const list<CoeffListEntry> nCenterFocus::CFRandomExperiment< variant, TPolynomXY, TFrommer1, TFrommer2 >::coeffRandomVariablesOrder_m [private] |
Definition at line 83 of file cfRandomExperiment.h.
TFrommer1::RingType::ScalarType nCenterFocus::CFRandomExperiment< variant, TPolynomXY, TFrommer1, TFrommer2 >::drittel_m [private] |
Definition at line 44 of file cfRandomExperiment.h.
TFrommer1::RingType const& nCenterFocus::CFRandomExperiment< variant, TPolynomXY, TFrommer1, TFrommer2 >::f1_ring_ref_m [private] |
Definition at line 58 of file cfRandomExperiment.h.
TFrommer2::RingType const& nCenterFocus::CFRandomExperiment< variant, TPolynomXY, TFrommer1, TFrommer2 >::f2_ring_ref_m [private] |
Definition at line 59 of file cfRandomExperiment.h.
TFrommer1::RingType::FieldType const& nCenterFocus::CFRandomExperiment< variant, TPolynomXY, TFrommer1, TFrommer2 >::frommer1_field_ref [private] |
Definition at line 61 of file cfRandomExperiment.h.
TFrommer1& nCenterFocus::CFRandomExperiment< variant, TPolynomXY, TFrommer1, TFrommer2 >::frommer1_m [private] |
Definition at line 52 of file cfRandomExperiment.h.
TFrommer2& nCenterFocus::CFRandomExperiment< variant, TPolynomXY, TFrommer1, TFrommer2 >::frommer2_m [private] |
Definition at line 53 of file cfRandomExperiment.h.
LiftAndQuadricsStatistic& nCenterFocus::CFRandomExperiment< variant, TPolynomXY, TFrommer1, TFrommer2 >::fullQuadricsStatistic_m [private] |
Definition at line 68 of file cfRandomExperiment.h.
RankStatistic& nCenterFocus::CFRandomExperiment< variant, TPolynomXY, TFrommer1, TFrommer2 >::fullRankStatistic_m [private] |
Definition at line 66 of file cfRandomExperiment.h.
FailedLiftStatistic& nCenterFocus::CFRandomExperiment< variant, TPolynomXY, TFrommer1, TFrommer2 >::liftStatistic_m [private] |
Definition at line 70 of file cfRandomExperiment.h.
const PolynomialRing<TPolynomXY,typename TFrommer1::RingType> nCenterFocus::CFRandomExperiment< variant, TPolynomXY, TFrommer1, TFrommer2 >::polynomialRing_m [private] |
Definition at line 62 of file cfRandomExperiment.h.
pair<TPolynomXY,TPolynomXY>* nCenterFocus::CFRandomExperiment< variant, TPolynomXY, TFrommer1, TFrommer2 >::pPointSolutions_m [private] |
Definition at line 74 of file cfRandomExperiment.h.
TFrommer1::RingType::ScalarType* nCenterFocus::CFRandomExperiment< variant, TPolynomXY, TFrommer1, TFrommer2 >::psolutions_m [private] |
Definition at line 73 of file cfRandomExperiment.h.
long64 nCenterFocus::CFRandomExperiment< variant, TPolynomXY, TFrommer1, TFrommer2 >::randomCounter_m [private] |
Definition at line 98 of file cfRandomExperiment.h.
Referenced by nCenterFocus::CFRandomExperiment< variant, TPolynomXY, TFrommer1, TFrommer2 >::getCurrentRandomCounter().
TPolynomXY& nCenterFocus::CFRandomExperiment< variant, TPolynomXY, TFrommer1, TFrommer2 >::randomMinusP_polynom_m [private] |
Definition at line 55 of file cfRandomExperiment.h.
TPolynomXY& nCenterFocus::CFRandomExperiment< variant, TPolynomXY, TFrommer1, TFrommer2 >::randomQ_polynom_m [private] |
Definition at line 56 of file cfRandomExperiment.h.
DStatistic* nCenterFocus::CFRandomExperiment< variant, TPolynomXY, TFrommer1, TFrommer2 >::st_m [private] |
Definition at line 65 of file cfRandomExperiment.h.
LiftAndQuadricsStatistic& nCenterFocus::CFRandomExperiment< variant, TPolynomXY, TFrommer1, TFrommer2 >::subQuadricsStatistic_m [private] |
Definition at line 69 of file cfRandomExperiment.h.
RankStatistic& nCenterFocus::CFRandomExperiment< variant, TPolynomXY, TFrommer1, TFrommer2 >::subRankStatistic_m [private] |
Definition at line 67 of file cfRandomExperiment.h.
const pair<TPolynomXY,TPolynomXY> nCenterFocus::CFRandomExperiment< variant, TPolynomXY, TFrommer1, TFrommer2 >::v1_m [private] |
Definition at line 79 of file cfRandomExperiment.h.
const pair<TPolynomXY,TPolynomXY> nCenterFocus::CFRandomExperiment< variant, TPolynomXY, TFrommer1, TFrommer2 >::v2_m [private] |
Definition at line 80 of file cfRandomExperiment.h.
TFrommer1::RingType::ScalarType nCenterFocus::CFRandomExperiment< variant, TPolynomXY, TFrommer1, TFrommer2 >::zwei_m [private] |
Definition at line 45 of file cfRandomExperiment.h.