Debian Codegraph @

07p/plaut04/src/solution.h

raw symbols SCIP
1 #ifndef SOLUTION_H
2 #define SOLUTION_H
3
4 #include <queue>
5
6 #include <Inventor/nodes/SoSeparator.h>
7
8 class Solution {
9 public:
10 Solution() {npar_ = 0;}
11 ~Solution() {}
12 void copyDataToWorkArray(int varIndices[], int cur, int mx, int to);
13 SoSeparator *createSceneWithWidgets();
14 SoSeparator *createInertialFrameScene(float dis);
15 bool parse(const char* sFileName);
16 bool read(const char* sFileName, int varIndices[]);
17 void normalizeData();
18 void alloc();
19 void dealloc();
20 void searchForMaxMin(int component, int varIndices[]);
21 void denormalizePosition(float position[]);
22 void set_parID(std::queue<int> &parIDs);
23
24 int nar() const {return nar_;}
25 int npar() const {return npar_;}
26 int parID(int i) const {return parID_[i];}
27 long int branchID(int i) const {return branchID_[i];}
28 long int numOrbits() const {return numOrbits_;}
29 long int labels(int i) const {return orbits_[i].label;}
30 int totalLabels() const {return totalLabels_;}
31 long totalNumPoints() const {return totalNumPoints_;}
32 int32_t numVerticesEachPeriod(int i) const {return orbits_[i].numVerticesEachPeriod;}
33 float **data() const {return data_;}
34 float masses(int i) const {return orbits_[i].mass;}
35
36 private:
37 SoSeparator *render();
38 SoGroup *renderPoints(int style);
39 SoGroup *renderLines();
40 SoGroup *renderNurbsCurve();
41 SoGroup *renderTubes();
42 SoGroup *renderSurface();
43 SoSeparator *drawUsingTubes();
44 SoSeparator *drawABranchUsingSurface(long obStart, long obEnd,
45 long numVert);
46 SoSeparator *animateUsingPoints(int style, bool aniColoring);
47 SoSeparator *animateUsingLines(bool aniColoring);
48 SoSeparator *animateUsingTubes(bool aniColoring);
49 SoSeparator *drawAnOrbitUsingPoints(int style, int iBranch, long int l,
50 long int si, float scaler, int stability, int type,
51 bool aniColoring);
52 SoSeparator *drawAnOrbitUsingLines(int iBranch, long int l, long int si,
53 float scaler, int stability, int type, bool aniColoring);
54 SoSeparator *drawAnOrbitUsingTubes(int iBranch, long int l, long int si,
55 float scaler, int stability, int type);
56 SoSeparator *drawAnOrbitUsingNurbsCurve(int iBranch, long int l,
57 long int si, float scaler,
58 int stability, int type);
59 SoSeparator *animateOrbitWithTail(int iBranch, long int j, long int si);
60 SoSeparator *drawAPoint(float x, float y, float z, float size, float scale);
61 SoSeparator *drawAStrip(float stripSet[][3], int size);
62
63 SoSeparator *animateOrbitInertialSysUsingLine(int iBranch, int iOrbit,
64 float (*vertices)[3], float (*largePrimPos)[3], float (*smallPrimPos)[3],
65 float * myColorBase, float period, int size,
66 float scaler, int stability, int type);
67 SoSeparator *drawAnOrbitInertialSysUsingLines(int iBranch, int iOrbit,
68 float (*myVertices)[3], float *myColorBase,
69 long int arrSize, float scaler, int stability, int type);
70 void convertDataToInertialSystem(float (*myVertices)[3],
71 float *timeEqualDiv, float *myColorBase,
72 long int arrSize, long int orbitSize, long int kth, long int sumX);
73 SoSeparator *drawAnOrbitInertialSysUsingTubes(int iBranch, int iOrbit,
74 float (*myVertices)[3], float *myColorBase, const long int arrSize,
75 const float tubeRadiusScaler, const int stability, const int type);
76 SoSeparator *drawAnOrbitInertialSysUsingNurbsCurve(int iBranch,
77 int iOrbit, float (*myVertices)[3], const long int arrSize,
78 const float scaler, const int stability, const int type);
79 #if 0 // unused R3B related functions
80 SoSeparator * animateIner2(long int j, long int si);
81 SoSeparator * animateOrbitMovement(long int n, long int si);
82 SoSeparator * animateOrbitCalSteps(long int n,long int si);
83 SoSeparator * animateOrbitWithNurbsCurveTail(long int j,long int si);
84 SoSeparator *drawEarthMovement(int k);
85 void calPrimPos(float t, float pos[]);
86 void calSatPos(int center, float mu, float t, float primPos[], float satPos[]);
87 SoSeparator *drawASphereWithColor(float color[], float position[], float size);
88 #endif
89
90 std::queue<long> positions_;
91 double *time_; // this time is useless?
92 float (*xyzCoords_)[3];
93 int32_t *numVerticesEachBranch_; // index start from 0
94 int32_t *numOrbitsInEachBranch_; // index start from 0
95 int nar_;
96 int npar_;
97
98 long int totalNumPoints_; // like 10012.
99 long int numBranches_; // like 4.
100 long int *branchID_; // for each label/solution
101 long int numOrbits_; // like 43 == UserData.totalLabels == BifNode.totalLabels == totalLabels.
102 struct orbit {
103 long int label;
104 long int ntst;
105 long int ncol;
106 double *par; // keep the parameter values for each orbit.
107 float mass;
108 float period; // from the solution file par[10];
109 int32_t numVerticesEachPeriod; // index start from 0
110 } *orbits_; // we have an array of numOrbits of these
111 int numAxis_; // number of groups of axis. 3 is a group.
112 int totalLabels_;
113 double (**parMax_); // keep the max parameter values in each branch.
114 double (**parMin_); // keep the min parameter values.
115 double (**parMid_); // keep the mid parameter values.
116 int *parID_; // keep the id for the par, namely the x for par(x)
117
118 // max saves the maximum value of the coordinate.
119 // min saves the minimum value of the coordinate.
120 float max_[3], min_[3];
121
122 float **data_;
123 };
124
125 extern Solution *mySolNode;
126
127 #endif