22 #include <boost/tuple/tuple.hpp> 26 using namespace gtsam;
30 template<
typename Derived>
37 template<
typename Derived>
76 double data[] = {10,20};
78 copy(data,data+2,b.data());
110 x(0) = 3;
x(1) = 1;
x(2) = 5;
x(3) = 1;
117 EXPECT(result.first==0.5);
125 for(
int i = 0;
i < 2;
i++)
128 for(
int i = 0;
i < 5;
i++)
132 for(
int i = 0;
i < 2;
i++)
C(
i) = A(
i);
133 for(
int i = 0;
i < 5;
i++)
C(
i+2) = B(
i);
150 x(0) = 1.0;
x(1) = 2.0;
155 Vector weights = sigmas.array().square().inverse();
164 double expPrecision = 200.0;
176 x(0) = 1.0;
x(1) = 2.0;
181 Vector weights = sigmas.array().square().inverse();
200 Vector weights = sigmas.array().square().inverse();
224 axpy(0.1,x,y2.head(3));
233 Vector v1 = (
Vector(1) << 0.0/std::numeric_limits<double>::quiet_NaN()).finished();
double weightedPseudoinverse(const Vector &a, const Vector &weights, Vector &pseudo)
static const Eigen::MatrixBase< Vector3 >::ConstantReturnType Z_3x1
static int runAllTests(TestResult &result)
#define DOUBLES_EQUAL(expected, actual, threshold)
BOOST_CONCEPT_ASSERT((boost::RandomAccessRangeConcept< ListOfOneContainer< int > >))
Matrix< SCALARB, Dynamic, Dynamic > B
Base class for all dense matrices, vectors, and arrays.
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 greaterThanOrEqual(const Vector &vec1, const Vector &vec2)
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
bool linear_dependent(const Matrix &A, const Matrix &B, double tol)
bool assert_equal(const Matrix &expected, const Matrix &actual, double tol)
TEST(Vector, special_comma_initializer)
pair< double, Vector > house(const Vector &x)
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
Eigen::Matrix< double, Eigen::Dynamic, 1 > Vector
Base class for all dense matrices, vectors, and expressions.
Vector concatVectors(const std::list< Vector > &vs)
Eigen::RowVectorXd RowVector