Skip to content

Commit bf5a401

Browse files
committed
basic documentation
1 parent 469b3ed commit bf5a401

File tree

8 files changed

+39
-20
lines changed

8 files changed

+39
-20
lines changed

src/quantiles.h

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,19 @@
2222
#include "statistics.h"
2323

2424

25+
//! Quantiles for recognition and snapping
2526
namespace Quantiles {
2627

27-
28-
struct Snapping // Quantiles for snapping of end-points
28+
//! Quantiles for snapping of end-points
29+
struct Snapping
2930
{
3031
public:
32+
//! Get quantile of standard normal distribution
3133
double quantile_stdNormDistr() const { return quantile_snd_; }
34+
35+
//! Get quantile of chi-square distribution with two degeree of freedom
3236
double quantile_chi2_1dof() const { return quantile_chi2_1_; }
33-
void setAlpha( double alpha );
37+
void setAlpha( double alpha ); //!< Set significande level alpha
3438

3539
private:
3640
double quantile_snd_{}; // Quantile of standard normal distribution N(0,1)
@@ -40,13 +44,16 @@ struct Snapping // Quantiles for snapping of end-points
4044
const Stats::StandardNormal distr_snd_{};
4145
};
4246

43-
44-
struct Recognition // Quantiles for recognition of constraints
47+
//! Quantiles for reconition of geometric relations
48+
struct Recognition
4549
{
4650
public:
51+
//! Get quantile of chi-square distribution with one degeree of freedom
4752
double quantile_chi2_1dof() const { return quantile_chi2_1dof_; }
53+
54+
//! Get quantile of chi-square distribution with two degeree of freedom
4855
double quantile_chi2_2dof() const { return quantile_chi2_2dof_; }
49-
void setAlpha( double alpha );
56+
void setAlpha( double alpha ); //!< Set significance level alpha
5057

5158
private:
5259
double quantile_chi2_1dof_{};

src/statistics.h

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@
2222
#include <limits>
2323
#include <cassert>
2424

25+
//! Parametric probability distributions
2526
namespace Stats {
2627

28+
//! Base class for parametric probability distributions
2729
class Distribution
2830
{
2931
public:
@@ -44,6 +46,7 @@ class Distribution
4446
};
4547

4648

49+
//! Standard normal distribution
4750
class StandardNormal : private Distribution
4851
{
4952
public:
@@ -63,7 +66,7 @@ class StandardNormal : private Distribution
6366
};
6467

6568

66-
69+
//! Gamma distribution
6770
class Gamma : private Distribution
6871
{
6972
public:
@@ -92,6 +95,7 @@ class Gamma : private Distribution
9295
};
9396

9497

98+
//! Chi-squared distribution
9599
class ChiSquared : private Distribution
96100
{
97101
public:
@@ -118,12 +122,7 @@ class ChiSquared : private Distribution
118122
};
119123

120124

121-
122-
123-
124-
125-
126-
125+
//! Exponential distribution
127126
class Exponential : private Distribution
128127
{
129128
public:

src/uncertain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace Uncertain {
2626

2727
static const double T_ZERO = 1e-7;
2828

29-
// type-safe
29+
//! Type-safe sign of parameter value
3030
template <typename T> int sign(T val) {
3131
return (T(0) < val) - (val < T(0));
3232
}

src/uncertain.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,17 @@
2121

2222
#include <Eigen/Dense>
2323

24-
24+
//! Uncertain geometric entities
2525
namespace Uncertain {
2626

2727
using Eigen::Matrix3d;
2828
using Eigen::Vector3d;
2929

30+
//! Check if matrix is covariance matrix
3031
bool isCovMat( const Eigen::MatrixXd &MM);
3132

3233

34+
//! Uncertain distance
3335
class uDistance
3436
{
3537
public:
@@ -54,7 +56,7 @@ class uDistance
5456
};
5557

5658

57-
59+
//! Base class for uncertain geometric entities, represented by 3-vectors
5860
class BasicEntity2D
5961
{
6062
protected:
@@ -90,6 +92,8 @@ class BasicEntity2D
9092
};
9193

9294
class uPoint;
95+
96+
//! Estimation of two points delimiting an uncertain straight line segment
9397
std::pair<uPoint,uPoint> uEndPoints( const Eigen::VectorXd &,
9498
const Eigen::VectorXd &);
9599

src/upoint.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ namespace Uncertain {
2828
class uStraightLine;
2929

3030

31+
//! Uncertain point
3132
class uPoint : public BasicEntity2D
3233
{
3334
public:

src/usegment.cpp

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,6 @@ namespace Uncertain {
3434

3535
class uPoint;
3636

37-
//Matrix3d skew( const Vector3d &x)
38-
//{
39-
// return (Matrix3d() << 0.,-x(2),x(1), x(2),0.,-x(0), -x(1),x(0),0.).finished();
40-
//}
4137

4238
Matrix3d uStraightLineSegment::CC()
4339
{
@@ -323,13 +319,17 @@ VectorXi uStraightLineSegment::indices_of_sorting( const VectorXd &v)
323319

324320

325321
QDataStream & operator>> ( QDataStream & in, Eigen::Matrix<double,9,1> & v);
322+
323+
//! Overloaded >>operator for 9-vectors
326324
QDataStream & operator>> ( QDataStream & in, Eigen::Matrix<double,9,1> & v)
327325
{
328326
for ( int i=0; i<9; i++) { in >> v[i]; }
329327
return in;
330328
}
331329

332330
QDataStream & operator>> ( QDataStream & in, Eigen::Matrix<double,9,9> & MM);
331+
332+
//! Overloaded >>operator for 9x9 matrices
333333
QDataStream & operator>> ( QDataStream & in, Eigen::Matrix<double,9,9> & MM)
334334
{
335335
for ( int i=0; i<9; i++) {
@@ -352,13 +352,17 @@ QDataStream & operator>> ( QDataStream & in, Eigen::Matrix<double,9,9> & MM)
352352
//}
353353

354354
QDataStream & operator<< ( QDataStream & out, const Eigen::Matrix<double,9,1> &v);
355+
356+
//! Overloaded <<operator for 9-vectors
355357
QDataStream & operator<< ( QDataStream & out, const Eigen::Matrix<double,9,1> &v)
356358
{
357359
//qDebug() << Q_FUNC_INFO;
358360
for ( int i=0; i<9; i++) { out << v[i]; }
359361
return out;
360362
}
361363
QDataStream & operator<< ( QDataStream & out, const Eigen::Matrix<double,9,9> &MM);
364+
365+
//! Overloaded <<operator for 9x9 matrices
362366
QDataStream & operator<< ( QDataStream & out, const Eigen::Matrix<double,9,9> &MM)
363367
{
364368
qDebug() << Q_FUNC_INFO;
@@ -371,6 +375,8 @@ QDataStream & operator<< ( QDataStream & out, const Eigen::Matrix<double,9,9> &M
371375
}
372376

373377
QDataStream & operator<< ( QDataStream & out, const aabb & box);
378+
379+
//! Overloaded <<operator for axis-aligned bounding box
374380
QDataStream & operator<< ( QDataStream & out, const aabb & bbox)
375381
{
376382
qDebug() << Q_FUNC_INFO;

src/usegment.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ using Eigen::Matrix3d;
3737
using Eigen::Vector2d;
3838
using Eigen::Vector3d;
3939

40+
//! Uncertain straight line segment
4041
class uStraightLineSegment
4142
{
4243
private:

src/ustraightline.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class uPoint;
3131

3232
Matrix3d skew( const Vector3d & x);
3333

34+
//! Uncertain straight line
3435
class uStraightLine : public BasicEntity2D
3536
{
3637
public:

0 commit comments

Comments
 (0)