25 using namespace gtsam;
29 template<
typename Derived>
36 template<
typename Derived>
75 double data[] = {10,20};
77 copy(data,data+2,b.data());
109 x(0) = 3;
x(1) = 1;
x(2) = 5;
x(3) = 1;
116 EXPECT(result.first==0.5);
124 for(
int i = 0;
i < 2;
i++)
127 for(
int i = 0;
i < 5;
i++)
131 for(
int i = 0;
i < 2;
i++)
C(
i) = A(
i);
132 for(
int i = 0;
i < 5;
i++)
C(
i+2) = B(
i);
149 x(0) = 1.0;
x(1) = 2.0;
154 Vector weights = sigmas.array().square().inverse();
162 double expPrecision = 200.0;
174 x(0) = 1.0;
x(1) = 2.0;
179 Vector weights = sigmas.array().square().inverse();
197 Vector weights = sigmas.array().square().inverse();
220 y2.head(3) += 0.1 *
x;
229 Vector v1 = (
Vector(1) << 0.0/std::numeric_limits<double>::quiet_NaN()).finished();
275 #ifdef GTSAM_USE_BOOST_FEATURES Matrix< SCALARB, Dynamic, Dynamic, opt_B > B
double weightedPseudoinverse(const Vector &a, const Vector &weights, Vector &pseudo)
static const Eigen::MatrixBase< Vector3 >::ConstantReturnType Z_3x1
#define GTSAM_CONCEPT_ASSERT(concept)
static int runAllTests(TestResult &result)
#define DOUBLES_EQUAL(expected, actual, threshold)
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
bool greaterThanOrEqual(const Vector &vec1, const Vector &vec2)
Matrix< SCALARA, Dynamic, Dynamic, opt_A > A
Base class for all dense matrices, vectors, and arrays.
bool linear_dependent(const Matrix &A, const Matrix &B, double tol)
pair< double, Vector > house(const Vector &x)
void householder(const MatrixType &m)
Scalar EIGEN_BLAS_FUNC() dot(int *n, RealScalar *px, int *incx, RealScalar *py, int *incy)
#define EXPECT(condition)
Array< double, 1, 3 > e(1./3., 0.5, 2.)
bool equal_with_abs_tol(const Eigen::DenseBase< MATRIX > &A, const Eigen::DenseBase< MATRIX > &B, double tol=1e-9)
Matrix< Scalar, Dynamic, Dynamic > C
typedef and functions to augment Eigen's VectorXd
TEST(Vector, special_comma_initializer)
int EIGEN_BLAS_FUNC() copy(int *n, RealScalar *px, int *incx, RealScalar *py, int *incy)
int EIGEN_BLAS_FUNC() axpy(const int *n, const RealScalar *palpha, const RealScalar *px, const int *incx, RealScalar *py, const int *incy)
The matrix class, also used for vectors and row-vectors.
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x
Vector concatVectors(const std::list< Vector > &vs)
Eigen::Matrix< double, Eigen::Dynamic, 1 > Vector
Base class for all dense matrices, vectors, and expressions.
Eigen::RowVectorXd RowVector