简单的双连通边链表结构。它只允许添加元素,不允许删除元素。 更多...
#include <DoublyConnectedEdgeList.h>
类 | |
struct | Face |
struct | HalfEdge |
struct | Node |
Public 类型 | |
using | ConstFaceIterator = typename FaceContainer::const_iterator |
using | ConstHalfEdgeIterator = typename HalfEdgeContainer::const_iterator |
using | ConstNodeIterator = typename NodeContainer::const_iterator |
using | FaceContainer = std::list<Face> |
using | FaceIterator = typename FaceContainer::iterator |
using | HalfEdgeContainer = std::list<HalfEdge> |
using | HalfEdgeIterator = typename HalfEdgeContainer::iterator |
using | NodeContainer = std::list<Node> |
using | NodeIterator = typename NodeContainer::iterator |
using | Position = MapGen::Position<int32> |
Public 成员函数 | |
DoublyConnectedEdgeList (const Position &Position0, const Position &Position1) | |
创建一个有2个节点、2个边和1个面的双连通边链表DoublyConnectedEdgeList。 | |
template<size_t N> | |
DoublyConnectedEdgeList (const std::array< Position, N > &Cycle) | |
创建一个由N个节点组成双连通链表DoublyConnectedEdgeList环。 | |
~DoublyConnectedEdgeList () | |
向图中添加元素--------------------------------------------------— | |
Node & | AddNode (const Position &NodePosition, Node &OtherNode) |
{ | |
Node & | SplitEdge (const Position &Position, HalfEdge &HalfEdge) |
在 位置分割 HalfEdge (和它的配对) | |
Face & | ConnectNodes (Node &Node0, Node &Node1) |
用一对边连接两个节点。 | |
统计图元素的数目 -----------------------------------------------— | |
size_t | CountNodes () const |
size_t | CountHalfEdges () const |
size_t | CountFaces () const |
访问图的元素 ---------------------------------------------------— | |
ListView< NodeIterator > | GetNodes () |
ListView< ConstNodeIterator > | GetNodes () const |
ListView< HalfEdgeIterator > | GetHalfEdges () |
ListView< ConstHalfEdgeIterator > | GetHalfEdges () const |
ListView< FaceIterator > | GetFaces () |
ListView< ConstFaceIterator > | GetFaces () const |
静态 Public 成员函数 | |
访问图指针 -----------------------------------------------------— | |
static Node & | GetSource (HalfEdge &halfEdge) |
static const Node & | GetSource (const HalfEdge &halfEdge) |
static Node & | GetTarget (HalfEdge &halfEdge) |
static const Node & | GetTarget (const HalfEdge &halfEdge) |
static HalfEdge & | GetPair (HalfEdge &halfEdge) |
static const HalfEdge & | GetPair (const HalfEdge &halfEdge) |
static Face & | GetFace (HalfEdge &halfEdge) |
static const Face & | GetFace (const HalfEdge &halfEdge) |
static HalfEdge & | GetLeavingHalfEdge (Node &node) |
static const HalfEdge & | GetLeavingHalfEdge (const Node &node) |
static HalfEdge & | GetHalfEdge (Face &face) |
static const HalfEdge & | GetHalfEdge (const Face &face) |
static HalfEdge & | GetNextInFace (HalfEdge &halfEdge) |
static const HalfEdge & | GetNextInFace (const HalfEdge &halfEdge) |
static HalfEdge & | GetNextInNode (HalfEdge &halfEdge) |
static const HalfEdge & | GetNextInNode (const HalfEdge &halfEdge) |
其他成员函数 ---------------------------------------------------— | |
static float | GetAngle (const HalfEdge &halfEdge) |
返回 half-edge 的角度,范围为 [-pi, pi] | |
Private 属性 | |
FaceContainer | Faces |
HalfEdgeContainer | HalfEdges |
NodeContainer | Nodes |
额外继承的成员函数 | |
![]() | |
NonCopyable ()=default | |
NonCopyable (const NonCopyable &)=delete | |
void | operator= (const NonCopyable &)=delete |
简单的双连通边链表结构。它只允许添加元素,不允许删除元素。
在文件 DoublyConnectedEdgeList.h 第 19 行定义.
using MapGen::DoublyConnectedEdgeList::ConstFaceIterator = typename FaceContainer::const_iterator |
在文件 DoublyConnectedEdgeList.h 第 85 行定义.
using MapGen::DoublyConnectedEdgeList::ConstHalfEdgeIterator = typename HalfEdgeContainer::const_iterator |
在文件 DoublyConnectedEdgeList.h 第 81 行定义.
using MapGen::DoublyConnectedEdgeList::ConstNodeIterator = typename NodeContainer::const_iterator |
在文件 DoublyConnectedEdgeList.h 第 77 行定义.
using MapGen::DoublyConnectedEdgeList::FaceContainer = std::list<Face> |
在文件 DoublyConnectedEdgeList.h 第 83 行定义.
using MapGen::DoublyConnectedEdgeList::FaceIterator = typename FaceContainer::iterator |
在文件 DoublyConnectedEdgeList.h 第 84 行定义.
using MapGen::DoublyConnectedEdgeList::HalfEdgeContainer = std::list<HalfEdge> |
在文件 DoublyConnectedEdgeList.h 第 79 行定义.
using MapGen::DoublyConnectedEdgeList::HalfEdgeIterator = typename HalfEdgeContainer::iterator |
在文件 DoublyConnectedEdgeList.h 第 80 行定义.
using MapGen::DoublyConnectedEdgeList::NodeContainer = std::list<Node> |
在文件 DoublyConnectedEdgeList.h 第 75 行定义.
using MapGen::DoublyConnectedEdgeList::NodeIterator = typename NodeContainer::iterator |
在文件 DoublyConnectedEdgeList.h 第 76 行定义.
using MapGen::DoublyConnectedEdgeList::Position = MapGen::Position<int32> |
在文件 DoublyConnectedEdgeList.h 第 27 行定义.
|
explicit |
创建一个有2个节点、2个边和1个面的双连通边链表DoublyConnectedEdgeList。
在文件 DoublyConnectedEdgeList.cpp 第 71 行定义.
|
inlineexplicit |
创建一个由N个节点组成双连通链表DoublyConnectedEdgeList环。
在文件 DoublyConnectedEdgeList.h 第 98 行定义.
MapGen::DoublyConnectedEdgeList::~DoublyConnectedEdgeList | ( | ) |
在文件 DoublyConnectedEdgeList.cpp 第 99 行定义.
DoublyConnectedEdgeList::Node & MapGen::DoublyConnectedEdgeList::AddNode | ( | const Position & | NodePosition, |
Node & | OtherNode ) |
{
Add a node at NodePosition and attach it to OtherNode.
时间复杂度为 O(n*log(n)),其中 n 是离开节点 OtherNode 的边数。
在文件 DoublyConnectedEdgeList.cpp 第 110 行定义.
引用了 MapGen::DoublyConnectedEdgeList::HalfEdge::Face, MapGen::FindPositionInNode(), HalfEdges, MapGen::DoublyConnectedEdgeList::HalfEdge::Next, Nodes , 以及 MapGen::DoublyConnectedEdgeList::HalfEdge::Pair.
DoublyConnectedEdgeList::Face & MapGen::DoublyConnectedEdgeList::ConnectNodes | ( | Node & | Node0, |
Node & | Node1 ) |
用一对边连接两个节点。
假设两个节点由同一面连接。
时间复杂度为 O(n0*log(n0) + n1*log(n1) + nf), 其中 n0 和 n1 分别是离开节点 Node0 和节点 Node1 的边数。 并且 nf 是包含两个节点的面的边数。
在文件 DoublyConnectedEdgeList.cpp 第 191 行定义.
引用了 MapGen::DoublyConnectedEdgeList::HalfEdge::Face, Faces, MapGen::FindPositionInNode(), GetHalfEdge(), GetNextInFace(), MapGen::DoublyConnectedEdgeList::Face::HalfEdge, HalfEdges, MapGen::DoublyConnectedEdgeList::HalfEdge::Next , 以及 MapGen::DoublyConnectedEdgeList::HalfEdge::Pair.
被这些函数引用 MapGen::splitFace().
|
inline |
在文件 DoublyConnectedEdgeList.h 第 158 行定义.
被这些函数引用 MapGen::GraphParser::GraphParser() , 以及 MapGen::randomize().
|
inline |
在文件 DoublyConnectedEdgeList.h 第 153 行定义.
被这些函数引用 MapGen::GraphParser::GraphParser() , 以及 MapGen::randomize().
|
inline |
在文件 DoublyConnectedEdgeList.h 第 148 行定义.
被这些函数引用 MapGen::GraphParser::GraphParser() , 以及 MapGen::randomize().
|
static |
返回 half-edge 的角度,范围为 [-pi, pi]
在文件 DoublyConnectedEdgeList.cpp 第 247 行定义.
引用了 MapGen::DoublyConnectedEdgeList::Node::GetPosition(), GetSource() , 以及 GetTarget().
被这些函数引用 MapGen::FindPositionInNode() , 以及 MapGen::fixGraphData().
|
inline |
在文件 DoublyConnectedEdgeList.h 第 190 行定义.
被这些函数引用 MapGen::GraphParser::GraphParser() , 以及 MapGen::randomize().
|
inline |
在文件 DoublyConnectedEdgeList.h 第 195 行定义.
在文件 DoublyConnectedEdgeList.h 第 269 行定义.
引用了 MapGen::DoublyConnectedEdgeList::Face::HalfEdge.
被这些函数引用 ConnectNodes(), MapGen::getRandomOpposingEdges() , 以及 MapGen::GraphParser::GraphParser().
|
inline |
在文件 DoublyConnectedEdgeList.h 第 180 行定义.
|
inline |
在文件 DoublyConnectedEdgeList.h 第 185 行定义.
在文件 DoublyConnectedEdgeList.h 第 257 行定义.
引用了 MapGen::DoublyConnectedEdgeList::Node::LeavingHalfEdge.
被这些函数引用 MapGen::fixGraphData().
|
inlinestatic |
在文件 DoublyConnectedEdgeList.h 第 283 行定义.
引用了 MapGen::DoublyConnectedEdgeList::HalfEdge::Next.
被这些函数引用 ConnectNodes(), MapGen::getRandomOpposingEdges() , 以及 MapGen::GraphParser::GraphParser().
|
inlinestatic |
在文件 DoublyConnectedEdgeList.h 第 300 行定义.
|
inline |
|
inline |
在文件 DoublyConnectedEdgeList.h 第 175 行定义.
在文件 DoublyConnectedEdgeList.h 第 233 行定义.
引用了 MapGen::DoublyConnectedEdgeList::HalfEdge::Pair.
被这些函数引用 FHalfEdgeCounter::Insert() , 以及 MapGen::RoadSegmentBuilder::insert().
在文件 DoublyConnectedEdgeList.h 第 209 行定义.
引用了 MapGen::DoublyConnectedEdgeList::HalfEdge::Source.
被这些函数引用 MapGen::RoadSegmentBuilder::Add(), GetAngle(), MapGen::getSourcePosition() , 以及 MapGen::GraphParser::GraphParser().
在文件 DoublyConnectedEdgeList.h 第 221 行定义.
引用了 MapGen::DoublyConnectedEdgeList::HalfEdge::Target.
被这些函数引用 GetAngle() , 以及 MapGen::getTargetPosition().
DoublyConnectedEdgeList::Node & MapGen::DoublyConnectedEdgeList::SplitEdge | ( | const Position & | Position, |
HalfEdge & | HalfEdge ) |
在 位置分割 HalfEdge (和它的配对)
时间复杂度为 O(n*log(n)),其中 n 是离开 HalfEdge 源的边数
在文件 DoublyConnectedEdgeList.cpp 第 145 行定义.
引用了 MapGen::DoublyConnectedEdgeList::HalfEdge::Face, MapGen::FindPositionInNode(), HalfEdges, MapGen::DoublyConnectedEdgeList::HalfEdge::Next, Nodes, MapGen::DoublyConnectedEdgeList::HalfEdge::Pair, MapGen::DoublyConnectedEdgeList::HalfEdge::Source , 以及 MapGen::DoublyConnectedEdgeList::HalfEdge::Target.
被这些函数引用 MapGen::splitFace().
|
private |
在文件 DoublyConnectedEdgeList.h 第 330 行定义.
被这些函数引用 ConnectNodes() , 以及 DoublyConnectedEdgeList().
|
private |
在文件 DoublyConnectedEdgeList.h 第 328 行定义.
被这些函数引用 AddNode(), ConnectNodes(), DoublyConnectedEdgeList() , 以及 SplitEdge().
|
private |
在文件 DoublyConnectedEdgeList.h 第 326 行定义.
被这些函数引用 AddNode(), DoublyConnectedEdgeList() , 以及 SplitEdge().