Commit 4277a87db3085b1cfe82d4f911e7f7861a382d12
1 parent
a99e19ed
modified flow.h & uncommented the getL_Vi & getL_VT functions
Showing
2 changed files
with
13 additions
and
13 deletions
Show diff stats
stim/biomodels/flow.h
@@ -18,9 +18,9 @@ public: | @@ -18,9 +18,9 @@ public: | ||
18 | void copyToArray(int *src, int *dest, float *radii, float *len); | 18 | void copyToArray(int *src, int *dest, float *radii, float *len); |
19 | int getDangleNodes(int datarow, int numNodes, int *row, int *column, int *dangleNodes); | 19 | int getDangleNodes(int datarow, int numNodes, int *row, int *column, int *dangleNodes); |
20 | void inversion(float **a, int n, float **b); | 20 | void inversion(float **a, int n, float **b); |
21 | - float determinant(float **a, int n); | ||
22 | 21 | ||
23 | protected: | 22 | protected: |
23 | + float determinant(float **a, int n); | ||
24 | int minor(float **src, float **dest, int row, int col, int order); | 24 | int minor(float **src, float **dest, int row, int col, int order); |
25 | }; | 25 | }; |
26 | 26 | ||
@@ -39,7 +39,7 @@ int flow::getDangleNodes(int datarow, int numNodes, int *column1, int *column2, | @@ -39,7 +39,7 @@ int flow::getDangleNodes(int datarow, int numNodes, int *column1, int *column2, | ||
39 | if( column2[i] == column2[y] ) // Is there a match? | 39 | if( column2[i] == column2[y] ) // Is there a match? |
40 | { | 40 | { |
41 | st = column2[i]; // Save the matching node | 41 | st = column2[i]; // Save the matching node |
42 | - cout << endl << column2[i] << " = " << column2[y] << endl; // Display the matching nodes | 42 | +// cout << endl << column2[i] << " = " << column2[y] << endl; // Display the matching nodes |
43 | memmove(column2+i, column2+i+1, (datarow-(i+1)) * sizeof(column2[0])); // Move up the rows | 43 | memmove(column2+i, column2+i+1, (datarow-(i+1)) * sizeof(column2[0])); // Move up the rows |
44 | // taking the places of the rows before them starting | 44 | // taking the places of the rows before them starting |
45 | // with where the matching node is located | 45 | // with where the matching node is located |
@@ -49,10 +49,10 @@ int flow::getDangleNodes(int datarow, int numNodes, int *column1, int *column2, | @@ -49,10 +49,10 @@ int flow::getDangleNodes(int datarow, int numNodes, int *column1, int *column2, | ||
49 | diff1++; // Count the matching node | 49 | diff1++; // Count the matching node |
50 | 50 | ||
51 | // Display the updated array (with the matching node moved to the bottommost row) | 51 | // Display the updated array (with the matching node moved to the bottommost row) |
52 | - cout << "Updated array:" << endl; | 52 | +/* cout << "Updated array:" << endl; |
53 | for( int k = 0; k < datarow; k++ ) | 53 | for( int k = 0; k < datarow; k++ ) |
54 | cout << column2[k] << endl; | 54 | cout << column2[k] << endl; |
55 | - | 55 | +*/ |
56 | // Decrement the counters | 56 | // Decrement the counters |
57 | // NOTE: The counters need to be decremented because the rows had been moved up, so the same | 57 | // NOTE: The counters need to be decremented because the rows had been moved up, so the same |
58 | // locations need to be read again because they contain different values now after the move. | 58 | // locations need to be read again because they contain different values now after the move. |
@@ -71,11 +71,11 @@ int flow::getDangleNodes(int datarow, int numNodes, int *column1, int *column2, | @@ -71,11 +71,11 @@ int flow::getDangleNodes(int datarow, int numNodes, int *column1, int *column2, | ||
71 | 71 | ||
72 | // Store the nodes that have no duplicates | 72 | // Store the nodes that have no duplicates |
73 | // NOTE: This will only save the nodes that have not been moved to the bottom. | 73 | // NOTE: This will only save the nodes that have not been moved to the bottom. |
74 | - cout << "\ndangleNodes array:" << endl; | 74 | +// cout << "\ndangleNodes array:" << endl; |
75 | for( int j = 0; j < datarow-diff1; j++ ) | 75 | for( int j = 0; j < datarow-diff1; j++ ) |
76 | { | 76 | { |
77 | dangleNodes[numPress] = column2[j]; | 77 | dangleNodes[numPress] = column2[j]; |
78 | - cout << dangleNodes[j] << endl; // DELETE!!! | 78 | +// cout << dangleNodes[j] << endl; // DELETE!!! |
79 | numPress++; // Count the non-duplicated node | 79 | numPress++; // Count the non-duplicated node |
80 | } | 80 | } |
81 | 81 | ||
@@ -89,18 +89,18 @@ int flow::getDangleNodes(int datarow, int numNodes, int *column1, int *column2, | @@ -89,18 +89,18 @@ int flow::getDangleNodes(int datarow, int numNodes, int *column1, int *column2, | ||
89 | if( dangleNodes[i] == column1[j] ) // Is there a match? | 89 | if( dangleNodes[i] == column1[j] ) // Is there a match? |
90 | { | 90 | { |
91 | st = column1[j]; // Save the matching node | 91 | st = column1[j]; // Save the matching node |
92 | - cout << endl << dangleNodes[i] << " = " << column1[j] << endl; // Display the matching nodes | 92 | +// cout << endl << dangleNodes[i] << " = " << column1[j] << endl; // Display the matching nodes |
93 | memmove(dangleNodes+i, dangleNodes+i+1, (datarow-diff1-(i+1)) * sizeof(dangleNodes[0])); | 93 | memmove(dangleNodes+i, dangleNodes+i+1, (datarow-diff1-(i+1)) * sizeof(dangleNodes[0])); |
94 | dangleNodes[count-1] = st; // Move the matching node to the bottom of the array | 94 | dangleNodes[count-1] = st; // Move the matching node to the bottom of the array |
95 | diff2++; // Count the matching node | 95 | diff2++; // Count the matching node |
96 | 96 | ||
97 | // Display the updated array | 97 | // Display the updated array |
98 | - cout << "Updated dangleNodes array:" << endl; | 98 | +/* cout << "Updated dangleNodes array:" << endl; |
99 | for( int k = 0; k < count-1; k++ ) | 99 | for( int k = 0; k < count-1; k++ ) |
100 | { | 100 | { |
101 | cout << dangleNodes[k] << endl; | 101 | cout << dangleNodes[k] << endl; |
102 | } | 102 | } |
103 | - | 103 | +*/ |
104 | // Decrement the counters | 104 | // Decrement the counters |
105 | i--; | 105 | i--; |
106 | j--; | 106 | j--; |
stim/visualization/obj.h
@@ -669,7 +669,7 @@ public: | @@ -669,7 +669,7 @@ public: | ||
669 | 669 | ||
670 | /// Returns the vertex indices for the specified line | 670 | /// Returns the vertex indices for the specified line |
671 | /// @param i is the index of the line | 671 | /// @param i is the index of the line |
672 | - /*std::vector< unsigned int > getL_Vi(unsigned int i){ | 672 | + std::vector< unsigned int > getL_Vi(unsigned int i){ |
673 | 673 | ||
674 | unsigned int nP = L[i].size(); | 674 | unsigned int nP = L[i].size(); |
675 | 675 | ||
@@ -686,12 +686,12 @@ public: | @@ -686,12 +686,12 @@ public: | ||
686 | } | 686 | } |
687 | 687 | ||
688 | return l; | 688 | return l; |
689 | - }*/ | 689 | + } |
690 | 690 | ||
691 | /// Returns a vector containing the list of texture coordinates associated with each point of a line. | 691 | /// Returns a vector containing the list of texture coordinates associated with each point of a line. |
692 | 692 | ||
693 | /// @param i is the index of the desired line | 693 | /// @param i is the index of the desired line |
694 | - /*std::vector< stim::vec<T> > getL_VT(unsigned int i){ | 694 | + std::vector< stim::vec<T> > getL_VT(unsigned int i){ |
695 | 695 | ||
696 | //get the number of points in the specified line | 696 | //get the number of points in the specified line |
697 | unsigned int nP = L[i].size(); | 697 | unsigned int nP = L[i].size(); |
@@ -717,7 +717,7 @@ public: | @@ -717,7 +717,7 @@ public: | ||
717 | } | 717 | } |
718 | 718 | ||
719 | return l; | 719 | return l; |
720 | - }*/ | 720 | + } |
721 | 721 | ||
722 | /// Add an array of vertices to the vertex list | 722 | /// Add an array of vertices to the vertex list |
723 | unsigned int addV(std::vector< stim::vec<T> > vertices){ | 723 | unsigned int addV(std::vector< stim::vec<T> > vertices){ |