Changeset 132
- Timestamp:
- 09/12/04 20:46:10 (7 years ago)
- Files:
-
- tags/v1/SConstruct (modified) (4 diffs)
- tags/v1/src/alg/common/lib/stat.cc (modified) (2 diffs)
- tags/v1/src/alg/common/pymod/wrap_common.cc (modified) (1 diff)
- tags/v1/src/base/lib/algorithm.hh (modified) (6 diffs)
- tags/v1/src/base/perf/SConscript (modified) (1 diff)
- tags/v1/src/base/perf/perf2.cc (copied) (copied from trunk/src/base/perf/perf2.cc)
- tags/v1/src/base/pymod/SConscript (modified) (1 diff)
- tags/v1/src/base/pymod/export_data_iterator.cc (copied) (copied from trunk/src/base/pymod/export_data_iterator.cc)
- tags/v1/src/base/pymod/export_point.cc (modified) (2 diffs)
- tags/v1/src/base/pymod/export_size.cc (modified) (1 diff)
- tags/v1/src/base/pymod/wrap_iplt.cc (modified) (2 diffs)
- tags/v1/src/gui/shell.cc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
tags/v1/SConstruct
r77 r132 46 46 47 47 boost_generic_libs = ["boost_filesystem"+boost_suffix,"boost_regex"+boost_suffix] 48 env.Append(LIBS = boost_generic_libs + ["fftw3", "xerces-c" ] + string.split(env["EXTRA_LIBS"]))48 env.Append(LIBS = boost_generic_libs + ["fftw3", "xerces-c", "pthread"] + string.split(env["EXTRA_LIBS"])) 49 49 50 50 # the Pymod environment adds the necessary flags and builder … … 53 53 platform.SetPythonInfo(pymod_env, env["PYTHON_VERSION"]) 54 54 platform.SetPymodBuilder(pymod_env) 55 pymod_env. Append(LIBPATH = "#lib")55 pymod_env.Prepend(LIBPATH = "#lib") 56 56 pymod_env.Append(LIBS = ["iplt","boost_python"+boost_suffix]) 57 57 … … 59 59 # algorithm environment, based on basic env 60 60 alg_env = env.Copy() 61 alg_env. Append(LIBPATH = "#lib")61 alg_env.Prepend(LIBPATH = "#lib") 62 62 alg_env.Append(LIBS = ["iplt"]) 63 63 … … 77 77 app_env = env.Copy() 78 78 app_env.Append(LIBS = "iplt") 79 app_env. Append(LIBPATH = '#/lib')79 app_env.Prepend(LIBPATH = '#/lib') 80 80 81 81 # unit tests env tags/v1/src/alg/common/lib/stat.cc
r80 r132 17 17 18 18 // total of data values 19 for(DataIterator it(data->GetExtent());!it.AtEnd(); it++) {19 for(DataIterator it(data->GetExtent());!it.AtEnd(); ++it) { 20 20 double v=data->GetReal(it); 21 21 _min=(v<_min) ? v : _min; … … 32 32 _ave_dev = 0.0; 33 33 _var = 0.0; 34 for(DataIterator it(data->GetExtent());!it.AtEnd(); it++) {34 for(DataIterator it(data->GetExtent());!it.AtEnd(); ++it) { 35 35 double diff = data->GetReal(it)-_mean; 36 36 _ave_dev += fabs(diff); tags/v1/src/alg/common/pymod/wrap_common.cc
r31 r132 38 38 .def("GetMinimum",&Stat::GetMinimum) 39 39 .def("GetMaximum",&Stat::GetMaximum) 40 .def("GetMean",&Stat::GetMean)41 40 .def("GetVariance",&Stat::GetVariance) 42 41 .def("GetStandardDeviation",&Stat::GetStandardDeviation) tags/v1/src/base/lib/algorithm.hh
r73 r132 63 63 //! visitor implementation for functions 64 64 virtual void VisitFunction(const Function* f) = 0; 65 pr ivate:65 protected: 66 66 //! assignement op 67 67 ConstAlgorithm& operator=(const ConstAlgorithm& a) {return *this;} … … 91 91 //! copy ctor 92 92 ModAlgorithm(const ModAlgorithm& a): AlgorithmBase(a) {} 93 private:93 //private: 94 94 //! assignement op 95 95 ModAlgorithm& operator=(const ModAlgorithm& a) {return *this;} … … 124 124 ModIPAlgorithm(const string& name): ModAlgorithm(name) {} 125 125 ModIPAlgorithm(const ModIPAlgorithm& a): ModAlgorithm(a) {} 126 private:126 //private: 127 127 ModIPAlgorithm& operator=(const ModIPAlgorithm& a) {return *this;} 128 128 }; … … 148 148 ModOPAlgorithm(const string& name): ModAlgorithm(name) {} 149 149 ModOPAlgorithm(const ModOPAlgorithm& a): ModAlgorithm(a) {} 150 private:150 //private: 151 151 ModOPAlgorithm& operator=(const ModOPAlgorithm& a) {return *this;} 152 152 }; … … 176 176 ImageStateAlgorithmOP(const ModAlgorithm& a): ModAlgorithm(a) {} 177 177 178 private:178 //private: 179 179 ImageStateAlgorithmOP& operator=(const ImageStateAlgorithmOP& a) {return *this;} 180 180 }; … … 209 209 ImageStateAlgorithmIP(const ModAlgorithm& a): ModAlgorithm(a) {} 210 210 211 private:211 //private: 212 212 ImageStateAlgorithmIP& operator=(const ImageStateAlgorithmIP& a) {return *this;} 213 213 }; tags/v1/src/base/perf/SConscript
r1 r132 4 4 p_env.Append(LIBS = 'dl', CPPPATH='../lib') 5 5 p_env.Program('perf1',['perf1.cc',base_static_lib]) 6 #p_env.Program('perf2',['perf2.cc',base_static_lib]) 6 7 tags/v1/src/base/pymod/SConscript
r78 r132 14 14 export_normalizer.cc 15 15 export_message.cc 16 export_data_iterator.cc 16 17 """) 17 18 tags/v1/src/base/pymod/export_point.cc
r51 r132 30 30 } 31 31 32 int point_len() {return 3;} 33 int point_getitem(const Point& p, int i) {return p[i];} 34 void point_setitem(Point& p, int i, int v) {p[i]=v;} 35 32 36 void export_Point() 33 37 { … … 41 45 .def("ToVec4",&Point::ToVec4) 42 46 .def(self_ns::str(self)) 47 .def("__len__",point_len) 48 .def("__getitem__",point_getitem) 49 .def("__setitem__",point_setitem) 43 50 ; 44 51 } tags/v1/src/base/pymod/export_size.cc
r48 r132 21 21 namespace iplt { 22 22 23 int size_len() {return 3;} 24 int size_getitem(const Size& s, int i) {return s[i];} 25 void size_setitem(Size& s, int i, int v) 26 { 27 if(v<1) throw Error("negative size value"); 28 s[i]=v; 29 } 30 23 31 void export_Size() 24 32 { 25 33 // size wrapper 26 class_<Size >("Size", init<int, optional <int, int> >() )34 class_<Size, bases<Point> >("Size", init<int, optional <int, int> >() ) 27 35 .def("GetHeight",&Size::GetHeight) 28 36 .def("GetWidth",&Size::GetWidth) 29 37 .def("GetDepth",&Size::GetDepth) 30 38 .def(self_ns::str(self)) 39 .def("__len__",size_len) 40 .def("__getitem__",size_getitem) 41 .def("__setitem__",size_setitem) 31 42 ; 32 43 } tags/v1/src/base/pymod/wrap_iplt.cc
r78 r132 37 37 void export_Normalizer(); 38 38 void export_Message(); 39 void export_DataIterator(); 39 40 40 41 // exception translator … … 71 72 72 73 export_Message(); 74 75 export_DataIterator(); 73 76 } 74 77 tags/v1/src/gui/shell.cc
r74 r132 50 50 _border[3]=20; 51 51 52 SetShellFont(wxFont( 8,wxMODERN,wxNORMAL,wxNORMAL));52 SetShellFont(wxFont(12,wxMODERN,wxNORMAL,wxNORMAL)); 53 53 54 54 SetVirtualSize(calc_size());
