hops
include
hops
Polytope
NormalizePolytope.hpp
Go to the documentation of this file.
1
#ifndef HOPS_NORMALIZEPOLYTOPE_HPP
2
#define HOPS_NORMALIZEPOLYTOPE_HPP
3
4
#include <Eigen/Core>
5
6
namespace
hops
{
7
15
template
<
typename
Derived1,
typename
Derived2>
16
void
normalizePolytope
(Eigen::MatrixBase<Derived1> &A, Eigen::MatrixBase<Derived2> &b) {
17
for
(
int
i = 0; i < A.rows(); ++i) {
18
const
double
norm = A.row(i).template lpNorm<2>();
19
A.row(i) /= norm;
20
b(i) /= norm;
21
}
22
}
23
}
24
25
26
#endif //HOPS_NORMALIZEPOLYTOPE_HPP
hops::normalizePolytope
void normalizePolytope(Eigen::MatrixBase< Derived1 > &A, Eigen::MatrixBase< Derived2 > &b)
Normalizes polytope defined by Ax < b.
Definition:
NormalizePolytope.hpp:16
hops
Definition:
CsvReader.hpp:8
Generated by
1.8.17