12 #include <Eigen/CXX11/Tensor> 18 return coordinates[0];
22 template <
int DataLayout>
28 for (
int i = 0;
i < 6; ++
i) {
38 return 3 * coordinates[0] + 11 * coordinates[1];
42 template <
int DataLayout>
48 for (
int i = 0;
i < 512; ++
i) {
49 for (
int j = 0;
j < 512; ++
j) {
56 template <
int DataLayout>
62 means[0] = rows / 2.0f;
63 means[1] = cols / 2.0f;
67 internal::GaussianGenerator<float, Eigen::DenseIndex, 2> gaussian_gen(means, std_devs);
72 for (
int i = 0;
i <
rows; ++
i) {
73 for (
int j = 0;
j <
cols; ++
j) {
74 float g_rows = powf(rows/2.0
f -
i, 2) / (3.14f * 3.14f) * 0.5
f;
75 float g_cols = powf(cols/2.0
f -
j, 2) / (2.7f * 2.7f) * 0.5
f;
76 float gaussian = expf(-g_rows - g_cols);
static void test_gaussian()
float operator()(const array< Eigen::DenseIndex, 2 > &coordinates) const
#define VERIFY_IS_EQUAL(a, b)
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
Point2Pair means(const std::vector< Point2Pair > &abPointPairs)
Calculate the two means of a set of Point2 pairs.
#define CALL_SUBTEST(FUNC)
Map< Matrix< T, Dynamic, Dynamic, ColMajor >, 0, OuterStride<> > matrix(T *data, int rows, int cols, int stride)
EIGEN_DECLARE_TEST(cxx11_tensor_generator)
float operator()(const array< Eigen::DenseIndex, 1 > &coordinates) const