Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038 #ifndef _NURBS_SOLVE_H_
00039 #define _NURBS_SOLVE_H_
00040
00041 #undef Success
00042 #include <Eigen/Dense>
00043
00044 #include <pcl/surface/on_nurbs/sparse_mat.h>
00045
00046 namespace pcl
00047 {
00048 namespace on_nurbs
00049 {
00050
00053 class NurbsSolve
00054 {
00055 public:
00057 NurbsSolve () :
00058 m_quiet (true)
00059 {
00060 }
00061
00063 void
00064 assign (unsigned rows, unsigned cols, unsigned dims);
00065
00067 void
00068 K (unsigned i, unsigned j, double v);
00070 void
00071 x (unsigned i, unsigned j, double v);
00073 void
00074 f (unsigned i, unsigned j, double v);
00075
00077 double
00078 K (unsigned i, unsigned j);
00080 double
00081 x (unsigned i, unsigned j);
00083 double
00084 f (unsigned i, unsigned j);
00085
00087 void
00088 resize (unsigned rows);
00089
00091 void
00092 printK ();
00094 void
00095 printX ();
00097 void
00098 printF ();
00099
00102 bool
00103 solve ();
00104
00106 Eigen::MatrixXd
00107 diff ();
00108
00110 inline void
00111 setQuiet (bool val)
00112 {
00113 m_quiet = val;
00114 }
00115
00117 inline void
00118 getSize (unsigned &rows, unsigned &cols, unsigned &dims)
00119 {
00120 rows = static_cast<unsigned>(m_feig.rows());
00121 cols = static_cast<unsigned>(m_xeig.rows());
00122 dims = static_cast<unsigned>(m_feig.cols());
00123 }
00124
00125 private:
00126 bool m_quiet;
00127 SparseMat m_Ksparse;
00128 Eigen::MatrixXd m_Keig;
00129 Eigen::MatrixXd m_xeig;
00130 Eigen::MatrixXd m_feig;
00131
00132 public:
00133 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
00134 };
00135
00136 }
00137 }
00138
00139 #endif