testPriorFactor.cpp
Go to the documentation of this file.
1 
8 #include <gtsam/base/Vector.h>
11 
12 using namespace std;
13 using namespace gtsam;
14 
15 /* ************************************************************************* */
16 
17 // Constructor scalar
18 TEST(PriorFactor, ConstructorScalar) {
20  PriorFactor<double> factor(1, 1.0, model);
21 }
22 
23 // Constructor vector3
24 TEST(PriorFactor, ConstructorVector3) {
25  SharedNoiseModel model = noiseModel::Isotropic::Sigma(3, 1.0);
26  PriorFactor<Vector3> factor(1, Vector3(1,2,3), model);
27 }
28 
29 // Constructor dynamic sized vector
30 TEST(PriorFactor, ConstructorDynamicSizeVector) {
31  Vector v(5); v << 1, 2, 3, 4, 5;
32  SharedNoiseModel model = noiseModel::Isotropic::Sigma(5, 1.0);
33  PriorFactor<Vector> factor(1, v, model);
34 }
35 
36 /* ************************************************************************* */
37 int main() {
38  TestResult tr;
39  return TestRegistry::runAllTests(tr);
40 }
41 /* ************************************************************************* */
static int runAllTests(TestResult &result)
Eigen::Vector3d Vector3
Definition: Vector.h:43
noiseModel::Diagonal::shared_ptr model
ArrayXcf v
Definition: Cwise_arg.cpp:1
Definition: Half.h:150
int main()
Eigen::VectorXd Vector
Definition: Vector.h:38
traits
Definition: chartTesting.h:28
typedef and functions to augment Eigen&#39;s VectorXd
TEST(PriorFactor, ConstructorScalar)
noiseModel::Base::shared_ptr SharedNoiseModel
Definition: NoiseModel.h:734


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:49:00