12void shiftSetFirst(Eigen::MatrixXd &A,
const Eigen::VectorXd &v);
14void appendFront(Eigen::MatrixXd &A, Eigen::VectorXd &v);
18void append(Eigen::VectorXd &v,
double value);
20template <
typename Derived1>
23 const Eigen::PlainObjectBase<Derived1> &B)
25 int n = A.rows(), m = A.cols();
26 if (n <= 0 && m <= 0) {
30 A.conservativeResize(n, m + B.cols());
31 for (
auto i = m; i < m + B.cols(); i++)
32 A.col(i) = B.col(i - m);
36template <
typename Derived1>
39 const Eigen::PlainObjectBase<Derived1> &app)
46 v.conservativeResize(n + app.size());
47 for (
int i = 0; i < app.size(); i++)
57template <
typename Derived>
58auto firstN(
const Eigen::PlainObjectBase<Derived> &val,
unsigned n) ->
const Eigen::Map<const Eigen::Matrix<typename Derived::Scalar, 1, Eigen::Dynamic>>
60 return {val.data(), std::min<Eigen::Index>(n, val.size())};
63template <typename Derived, typename Iter = const typename Derived::Scalar *, typename Size = typename std::iterator_traits<Iter>::difference_type>
66 auto begin = eigen.data();
69 return {n, begin, end};
72template <
typename DerivedLHS,
typename DerivedRHS>
73bool componentWiseLess(
const Eigen::PlainObjectBase<DerivedLHS> &lhs,
const Eigen::PlainObjectBase<DerivedRHS> &rhs)
75 if (lhs.size() != rhs.size())
78 for (
int i = 0; i < rhs.size(); ++i) {
79 if (lhs[i] != rhs[i]) {
80 return lhs[i] < rhs[i];
87 template <
typename DerivedLHS,
typename DerivedRHS>
88 bool operator()(
const Eigen::PlainObjectBase<DerivedLHS> &lhs,
const Eigen::PlainObjectBase<DerivedRHS> &rhs)
const
#define PRECICE_ASSERT(...)
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)
Main namespace of the precice library.
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.