Commit ee17b90b85ed02d46daf671d28522da6293f1ec7

Authored by Jiaming Guo
1 parent da89bce9

make it compatible on linux

stim/biomodels/network.h
... ... @@ -71,7 +71,7 @@ class network{
71 71 /// Constructor - creates an edge from a list of points by calling the stim::fiber constructor
72 72  
73 73 ///@param p is an array of positions in space
74   - edge(centerline p) : cylinder<T>(p){}
  74 + edge(stim::centerline<T> p) : cylinder<T>(p){}
75 75  
76 76 /// Copy constructor creates an edge from a cylinder
77 77 edge(stim::cylinder<T> f) : cylinder<T>(f) {}
... ... @@ -673,7 +673,7 @@ public:
673 673 //compare each point in the current network to the field produced by A
674 674 kdt.create(c, n_data, MaxTreeLevels); // build a KD tree
675 675  
676   - std::vector<std::vector<unsigned>> relation; // the relationship between GT and T corresponding to NN
  676 + std::vector<std::vector<unsigned> > relation; // the relationship between GT and T corresponding to NN
677 677 relation.resize(A.E.size());
678 678  
679 679 for(unsigned e = 0; e < A.E.size(); e++){ //for each edge in A
... ...
stim/math/circle.h
... ... @@ -35,6 +35,8 @@ public:
35 35 using stim::plane<T>::rotate;
36 36 using stim::plane<T>::setU;
37 37  
  38 + using stim::plane<T>::init;
  39 +
38 40 ///base constructor
39 41 ///@param th value of the angle of the starting point from 0 to 360.
40 42 CUDA_CALLABLE
... ... @@ -137,7 +139,7 @@ public:
137 139 bool
138 140 operator==(const circle<T> & rhs)
139 141 {
140   - if(P == rhs.P && U == rhs.U && Y == rhs.Y)
  142 + if(P == rhs.P && U == rhs.U)
141 143 return true;
142 144 else
143 145 return false;
... ...
stim/structures/kdtree.cuh
... ... @@ -360,7 +360,7 @@ namespace stim {
360 360 //bb.init(&h_reference_points[0]);
361 361 //aaboundingboxing<T, D>(bb, h_reference_points, reference_count);
362 362  
363   - std::vector < typename cpu_kdtree::point<T, D>> reference_points(reference_count); // restore the reference points in particular way
  363 + std::vector < typename cpu_kdtree::point<T, D> > reference_points(reference_count); // restore the reference points in particular way
364 364 for (size_t j = 0; j < reference_count; j++)
365 365 for (size_t i = 0; i < D; i++)
366 366 reference_points[j].dim[i] = h_reference_points[j * D + i]; // creating a tree on cpu
... ...
stim/visualization/cylinder.h
... ... @@ -11,6 +11,8 @@ namespace stim
11 11 template<typename T>
12 12 class cylinder : public centerline<T> {
13 13 protected:
  14 +
  15 + using stim::centerline<T>::d;
14 16  
15 17 std::vector< stim::vec3<T> > U; //stores the array of U vectors defining the Frenet frame
16 18 std::vector< T > R; //stores a list of magnitudes for each point in the centerline (assuming mags[0] is the radius)
... ... @@ -36,23 +38,25 @@ public:
36 38  
37 39 using stim::centerline<T>::size;
38 40 using stim::centerline<T>::at;
  41 + using stim::centerline<T>::L;
  42 + using stim::centerline<T>::length;
39 43  
40   - cylinder() : centerline(){}
41   -
42   - cylinder(centerline& c) : centerline(c) {
43   - init();
44   - }
  44 + cylinder() : centerline<T>(){}
45 45  
46   - cylinder(centerline& c, T r) : centerline(c) {
  46 + cylinder(centerline<T>c) : centerline<T>(c) {
47 47 init();
48   - //add_mag(r);
49 48 }
50 49  
  50 + //cylinder(centerline<T>c, T r) : centerline(c) {
  51 + // init();
  52 + // //add_mag(r);
  53 + //}
  54 +
51 55 //initialize a cylinder with a list of points and magnitude values
52   - cylinder(centerline& c, std::vector<T> r) : centerline(c){
53   - init();
54   - //add_mag(r);
55   - }
  56 + //cylinder(centerline<T>c, std::vector<T> r) : centerline(c){
  57 + // init();
  58 + // //add_mag(r);
  59 + //}
56 60  
57 61 //copy the original radius
58 62 void copy_r(std::vector<T> radius) {
... ...
stim/visualization/swc.h
... ... @@ -85,7 +85,7 @@ namespace stim {
85 85 template <typename T>
86 86 class swc {
87 87 public:
88   - std::vector< typename swc_tree::swc_node<T>> node;
  88 + std::vector< typename swc_tree::swc_node<T> > node;
89 89 swc() {}; // default constructor
90 90  
91 91 // load the swc as tree nodes
... ...