Skip to content

Commit cbdd188

Browse files
committed
[Jenkins] auto-formatting by clang-format version 6.0.0-1ubuntu2~16.04.1 (tags/RELEASE_600/final)
1 parent 6e8161e commit cbdd188

2 files changed

Lines changed: 11 additions & 11 deletions

File tree

stan/math/prim/fun/to_array_1d.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ inline std::vector<value_type_t<EigMat>> to_array_1d(const EigMat& matrix) {
1616
using T_val = value_type_t<EigMat>;
1717
std::vector<T_val> result(matrix.size());
1818
Eigen::Map<Eigen::Matrix<T_val, EigMat::RowsAtCompileTime,
19-
EigMat::ColsAtCompileTime>>(result.data(), matrix.rows(),
20-
matrix.cols())
19+
EigMat::ColsAtCompileTime>>(
20+
result.data(), matrix.rows(), matrix.cols())
2121
= matrix;
2222
return result;
2323
}

test/unit/math/prim/fun/to_array1d_test.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@
66

77
using stan::math::to_array_1d;
88

9-
TEST(MathMatrix, to_array_1d_matrix){
10-
Eigen::MatrixXd a(3,3);
11-
a << 1,2,3,4,5,6,7,8,9;
12-
std::vector<double> a_correct{1,4,7,2,5,8,3,6,9};
9+
TEST(MathMatrix, to_array_1d_matrix) {
10+
Eigen::MatrixXd a(3, 3);
11+
a << 1, 2, 3, 4, 5, 6, 7, 8, 9;
12+
std::vector<double> a_correct{1, 4, 7, 2, 5, 8, 3, 6, 9};
1313
std::vector<double> a_res = to_array_1d(a);
1414
expect_std_vector_eq(a_res, a_correct);
1515
}
1616

17-
TEST(MathMatrix, to_array_1d_matrix_block){
18-
Eigen::MatrixXd a(3,3);
19-
a << 1,2,3,4,5,6,7,8,9;
20-
std::vector<double> a_correct{2,5,3,6};
21-
std::vector<double> a_res = to_array_1d(a.block(0,1,2,2));
17+
TEST(MathMatrix, to_array_1d_matrix_block) {
18+
Eigen::MatrixXd a(3, 3);
19+
a << 1, 2, 3, 4, 5, 6, 7, 8, 9;
20+
std::vector<double> a_correct{2, 5, 3, 6};
21+
std::vector<double> a_res = to_array_1d(a.block(0, 1, 2, 2));
2222
expect_std_vector_eq(a_res, a_correct);
2323
}

0 commit comments

Comments
 (0)