00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00025
00026 #ifndef BTK_MATH_LINEAR_ALGEBRA_HPP
00027 #define BTK_MATH_LINEAR_ALGEBRA_HPP
00028
00029 #include <cmath>
00030 #include <iosfwd>
00031 #include <vector>
00032
00033 #include <boost/numeric/ublas/symmetric.hpp>
00034
00035 #include <btk/core/math/constants.hpp>
00036 #include <btk/core/math/btk_vector.hpp>
00037 #include <btk/core/math/btk_matrix.hpp>
00038 #include <btk/core/math/vector_math.hpp>
00039
00040 namespace uBLAS = boost::numeric::ublas;
00041
00042 namespace BTK {
00043 namespace MATH {
00044
00054 typedef uBLAS::symmetric_matrix<double> BTKSymmetricMatrix;
00056
00064 bool
00065 within_sqr_dist(BTKVector const & a,
00066 BTKVector const & b,
00067 double r_squared);
00068
00070 inline
00071 double
00072 point_angle(BTKVector const & v1,
00073 BTKVector const & v2,
00074 BTKVector const & v3){
00075 return vector_angle(v1-v2,v3-v2);
00076 }
00077
00078
00084 double
00085 point_dihedral(BTKVector const & a,
00086 BTKVector const & b,
00087 BTKVector const & c,
00088 BTKVector const & d);
00089
00102 BTKVector
00103 set_vector_from_dihedral(BTKVector const & v3,
00104 BTKVector const & v2,
00105 BTKVector const & v1,
00106 double len34,
00107 double ang234,
00108 double dih1234);
00109
00128 BTKVector
00129 set_vector_from_two_angles(BTKVector const & v3,
00130 BTKVector const & v2,
00131 BTKVector const & v1,
00132 double len34,
00133 double ang234,
00134 double ang134);
00135
00136
00137 }
00138 }
00139
00140 #endif // BTK_LINEAR_ALGEBRA_H