OpenMEEG
Toggle main menu visibility
Loading...
Searching...
No Matches
OpenMEEG
include
edge.h
Go to the documentation of this file.
1
// Project Name: OpenMEEG (http://openmeeg.github.io)
2
// © INRIA and ENPC under the French open source license CeCILL-B.
3
// See full copyright notice in the file LICENSE.txt
4
// If you make a copy of this file, you must either:
5
// - provide also LICENSE.txt and modify this header to refer to it.
6
// - replace this header by the LICENSE.txt content.
7
8
#pragma once
9
10
#include <vector>
11
#include <
vertex.h
>
12
13
namespace
OpenMEEG
{
14
17
18
class
OPENMEEG_EXPORT
Edge
{
19
public
:
20
21
Edge
() {
22
vertices[0] =
nullptr
;
23
vertices[1] =
nullptr
;
24
}
25
26
Edge
(
const
Vertex
& V1,
const
Vertex
& V2) {
27
vertices[0] = &V1;
28
vertices[1] = &V2;
29
}
30
31
const
Vertex
&
vertex
(
const
unsigned
i)
const
{
return
*vertices[i]; }
32
33
bool
operator==
(
const
Edge
& e)
const
{
return
(e.
vertex
(0)==
vertex
(0)) && (e.
vertex
(1)==
vertex
(1)); }
34
bool
operator!=
(
const
Edge
& e)
const
{
return
(e.
vertex
(0)!=
vertex
(0)) || (e.
vertex
(1)!=
vertex
(1)); }
35
36
private
:
37
38
const
Vertex
* vertices[2];
39
};
40
41
typedef
std::vector<Edge>
Edges
;
42
}
OpenMEEG::Edge::Edge
Edge()
Definition
edge.h:21
OpenMEEG::Edge::operator!=
bool operator!=(const Edge &e) const
Definition
edge.h:34
OpenMEEG::Edge::vertex
const Vertex & vertex(const unsigned i) const
Definition
edge.h:31
OpenMEEG::Edge::Edge
Edge(const Vertex &V1, const Vertex &V2)
Definition
edge.h:26
OpenMEEG::Edge::operator==
bool operator==(const Edge &e) const
Definition
edge.h:33
OpenMEEG::Vertex
Vertex.
Definition
vertex.h:20
OpenMEEG
Definition
analytics.h:14
OpenMEEG::Edges
std::vector< Edge > Edges
Definition
edge.h:41
vertex.h
Generated by
1.17.0