hops
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
Functions
_
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
Variables
Typedefs
b
d
e
f
m
o
p
r
s
u
v
Enumerations
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
z
~
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
w
z
~
Variables
_
a
b
c
d
e
i
l
m
n
o
p
r
s
t
u
v
w
Typedefs
b
c
e
f
h
i
m
r
s
t
u
v
Enumerations
Enumerator
Related Functions
:
a
c
d
f
h
n
o
r
s
t
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
w
Functions
a
b
c
d
e
f
g
h
i
m
n
o
p
r
s
t
w
Variables
Typedefs
c
d
f
n
p
Enumerations
Enumerator
Macros
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
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