11void shiftSetFirst(Eigen::MatrixXd &A,
const Eigen::VectorXd &v);
13void appendFront(Eigen::MatrixXd &A, Eigen::VectorXd &v);
17void append(Eigen::VectorXd &v,
double value);
19template <
typename Derived1>
22 const Eigen::PlainObjectBase<Derived1> &B)
24 int n = A.rows(), m = A.cols();
25 if (n <= 0 && m <= 0) {
29 A.conservativeResize(n, m + B.cols());
30 for (
auto i = m; i < m + B.cols(); i++)
31 A.col(i) = B.col(i - m);
35template <
typename Derived1>
38 const Eigen::PlainObjectBase<Derived1> &app)
45 v.conservativeResize(n + app.size());
46 for (
int i = 0; i < app.size(); i++)
56template <
typename Derived>
57auto firstN(
const Eigen::PlainObjectBase<Derived> &val,
unsigned n) ->
const Eigen::Map<const Eigen::Matrix<typename Derived::Scalar, 1, Eigen::Dynamic>>
57auto firstN(
const Eigen::PlainObjectBase<Derived> &val,
unsigned n) ->
const Eigen::Map<const Eigen::Matrix<typename Derived::Scalar, 1, Eigen::Dynamic>> {
…}
62template <typename Derived, typename Iter = const typename Derived::Scalar *, typename Size = typename std::iterator_traits<Iter>::difference_type>
65 auto begin = eigen.data();
68 return {n, begin, end};
71template <
typename DerivedLHS,
typename DerivedRHS>
72bool componentWiseLess(
const Eigen::PlainObjectBase<DerivedLHS> &lhs,
const Eigen::PlainObjectBase<DerivedRHS> &rhs)
74 if (lhs.size() != rhs.size())
77 for (
int i = 0; i < rhs.size(); ++i) {
78 if (lhs[i] != rhs[i]) {
79 return lhs[i] < rhs[i];
72bool componentWiseLess(
const Eigen::PlainObjectBase<DerivedLHS> &lhs,
const Eigen::PlainObjectBase<DerivedRHS> &rhs) {
…}
86 template <
typename DerivedLHS,
typename DerivedRHS>
87 bool operator()(
const Eigen::PlainObjectBase<DerivedLHS> &lhs,
const Eigen::PlainObjectBase<DerivedRHS> &rhs)
const
87 bool operator()(
const Eigen::PlainObjectBase<DerivedLHS> &lhs,
const Eigen::PlainObjectBase<DerivedRHS> &rhs)
const {
…}
#define PRECICE_ASSERT(...)
contains precice-related utilities.
void removeColumnFromMatrix(Eigen::MatrixXd &A, int col)
void appendFront(Eigen::MatrixXd &A, Eigen::VectorXd &v)
void append(Eigen::VectorXd &v, double value)
const RangePreview< Iter > previewRange(Size n, const Range &range)
auto firstN(const Eigen::PlainObjectBase< Derived > &val, unsigned n) -> const Eigen::Map< const Eigen::Matrix< typename Derived::Scalar, 1, Eigen::Dynamic > >
void shiftSetFirst(Eigen::MatrixXd &A, const Eigen::VectorXd &v)
bool componentWiseLess(const Eigen::PlainObjectBase< DerivedLHS > &lhs, const Eigen::PlainObjectBase< DerivedRHS > &rhs)
bool operator()(const Eigen::PlainObjectBase< DerivedLHS > &lhs, const Eigen::PlainObjectBase< DerivedRHS > &rhs) const
The RangePreview object used as a lazy proxy struct for proviewing the content of a Range.