CARLA
 
载入中...
搜索中...
未找到
| Public 类型 | Public 成员函数 | Private 属性 | 所有成员列表
MapGen::DoublyConnectedEdgeList类 参考

简单的双连通边链表结构。它只允许添加元素,不允许删除元素。 更多...

#include <DoublyConnectedEdgeList.h>

+ 类 MapGen::DoublyConnectedEdgeList 继承关系图:
+ MapGen::DoublyConnectedEdgeList 的协作图:

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 ()
 
向图中添加元素--------------------------------------------------—
NodeAddNode (const Position &NodePosition, Node &OtherNode)
 {
 
NodeSplitEdge (const Position &Position, HalfEdge &HalfEdge)
 位置分割 HalfEdge (和它的配对)
 
FaceConnectNodes (Node &Node0, Node &Node1)
 用一对边连接两个节点。
 
统计图元素的数目 -----------------------------------------------—
size_t CountNodes () const
 
size_t CountHalfEdges () const
 
size_t CountFaces () const
 
访问图的元素 ---------------------------------------------------—
ListView< NodeIteratorGetNodes ()
 
ListView< ConstNodeIteratorGetNodes () const
 
ListView< HalfEdgeIteratorGetHalfEdges ()
 
ListView< ConstHalfEdgeIteratorGetHalfEdges () const
 
ListView< FaceIteratorGetFaces ()
 
ListView< ConstFaceIteratorGetFaces () const
 

静态 Public 成员函数

访问图指针 -----------------------------------------------------—
static NodeGetSource (HalfEdge &halfEdge)
 
static const NodeGetSource (const HalfEdge &halfEdge)
 
static NodeGetTarget (HalfEdge &halfEdge)
 
static const NodeGetTarget (const HalfEdge &halfEdge)
 
static HalfEdgeGetPair (HalfEdge &halfEdge)
 
static const HalfEdgeGetPair (const HalfEdge &halfEdge)
 
static FaceGetFace (HalfEdge &halfEdge)
 
static const FaceGetFace (const HalfEdge &halfEdge)
 
static HalfEdgeGetLeavingHalfEdge (Node &node)
 
static const HalfEdgeGetLeavingHalfEdge (const Node &node)
 
static HalfEdgeGetHalfEdge (Face &face)
 
static const HalfEdgeGetHalfEdge (const Face &face)
 
static HalfEdgeGetNextInFace (HalfEdge &halfEdge)
 
static const HalfEdgeGetNextInFace (const HalfEdge &halfEdge)
 
static HalfEdgeGetNextInNode (HalfEdge &halfEdge)
 
static const HalfEdgeGetNextInNode (const HalfEdge &halfEdge)
 
其他成员函数 ---------------------------------------------------—
static float GetAngle (const HalfEdge &halfEdge)
 返回 half-edge 的角度,范围为 [-pi, pi]
 

Private 属性

FaceContainer Faces
 
HalfEdgeContainer HalfEdges
 
NodeContainer Nodes
 

额外继承的成员函数

- Private 成员函数 继承自 NonCopyable
 NonCopyable ()=default
 
 NonCopyable (const NonCopyable &)=delete
 
void operator= (const NonCopyable &)=delete
 

详细描述

简单的双连通边链表结构。它只允许添加元素,不允许删除元素。

在文件 DoublyConnectedEdgeList.h19 行定义.

成员类型定义说明

◆ ConstFaceIterator

using MapGen::DoublyConnectedEdgeList::ConstFaceIterator = typename FaceContainer::const_iterator

在文件 DoublyConnectedEdgeList.h85 行定义.

◆ ConstHalfEdgeIterator

using MapGen::DoublyConnectedEdgeList::ConstHalfEdgeIterator = typename HalfEdgeContainer::const_iterator

在文件 DoublyConnectedEdgeList.h81 行定义.

◆ ConstNodeIterator

using MapGen::DoublyConnectedEdgeList::ConstNodeIterator = typename NodeContainer::const_iterator

在文件 DoublyConnectedEdgeList.h77 行定义.

◆ FaceContainer

在文件 DoublyConnectedEdgeList.h83 行定义.

◆ FaceIterator

using MapGen::DoublyConnectedEdgeList::FaceIterator = typename FaceContainer::iterator

在文件 DoublyConnectedEdgeList.h84 行定义.

◆ HalfEdgeContainer

在文件 DoublyConnectedEdgeList.h79 行定义.

◆ HalfEdgeIterator

using MapGen::DoublyConnectedEdgeList::HalfEdgeIterator = typename HalfEdgeContainer::iterator

在文件 DoublyConnectedEdgeList.h80 行定义.

◆ NodeContainer

在文件 DoublyConnectedEdgeList.h75 行定义.

◆ NodeIterator

using MapGen::DoublyConnectedEdgeList::NodeIterator = typename NodeContainer::iterator

在文件 DoublyConnectedEdgeList.h76 行定义.

◆ Position

在文件 DoublyConnectedEdgeList.h27 行定义.

构造及析构函数说明

◆ DoublyConnectedEdgeList() [1/2]

MapGen::DoublyConnectedEdgeList::DoublyConnectedEdgeList ( const Position & Position0,
const Position & Position1 )
explicit

创建一个有2个节点、2个边和1个面的双连通边链表DoublyConnectedEdgeList。

在文件 DoublyConnectedEdgeList.cpp71 行定义.

引用了 Faces, HalfEdges , 以及 Nodes.

◆ DoublyConnectedEdgeList() [2/2]

template<size_t N>
MapGen::DoublyConnectedEdgeList::DoublyConnectedEdgeList ( const std::array< Position, N > & Cycle)
inlineexplicit

创建一个由N个节点组成双连通链表DoublyConnectedEdgeList环。

在文件 DoublyConnectedEdgeList.h98 行定义.

◆ ~DoublyConnectedEdgeList()

MapGen::DoublyConnectedEdgeList::~DoublyConnectedEdgeList ( )

在文件 DoublyConnectedEdgeList.cpp99 行定义.

成员函数说明

◆ AddNode()

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.cpp110 行定义.

引用了 MapGen::DoublyConnectedEdgeList::HalfEdge::Face, MapGen::FindPositionInNode(), HalfEdges, MapGen::DoublyConnectedEdgeList::HalfEdge::Next, Nodes , 以及 MapGen::DoublyConnectedEdgeList::HalfEdge::Pair.

+ 函数调用图:

◆ ConnectNodes()

DoublyConnectedEdgeList::Face & MapGen::DoublyConnectedEdgeList::ConnectNodes ( Node & Node0,
Node & Node1 )

用一对边连接两个节点。

假设两个节点由同一面连接。

时间复杂度为 O(n0*log(n0) + n1*log(n1) + nf), 其中 n0 和 n1 分别是离开节点 Node0 和节点 Node1 的边数。 并且 nf 是包含两个节点的面的边数。

返回
新生成的面。

在文件 DoublyConnectedEdgeList.cpp191 行定义.

引用了 MapGen::DoublyConnectedEdgeList::HalfEdge::Face, Faces, MapGen::FindPositionInNode(), GetHalfEdge(), GetNextInFace(), MapGen::DoublyConnectedEdgeList::Face::HalfEdge, HalfEdges, MapGen::DoublyConnectedEdgeList::HalfEdge::Next , 以及 MapGen::DoublyConnectedEdgeList::HalfEdge::Pair.

被这些函数引用 MapGen::splitFace().

+ 函数调用图:
+ 这是这个函数的调用关系图:

◆ CountFaces()

size_t MapGen::DoublyConnectedEdgeList::CountFaces ( ) const
inline

在文件 DoublyConnectedEdgeList.h158 行定义.

被这些函数引用 MapGen::GraphParser::GraphParser() , 以及 MapGen::randomize().

+ 这是这个函数的调用关系图:

◆ CountHalfEdges()

size_t MapGen::DoublyConnectedEdgeList::CountHalfEdges ( ) const
inline

在文件 DoublyConnectedEdgeList.h153 行定义.

被这些函数引用 MapGen::GraphParser::GraphParser() , 以及 MapGen::randomize().

+ 这是这个函数的调用关系图:

◆ CountNodes()

size_t MapGen::DoublyConnectedEdgeList::CountNodes ( ) const
inline

在文件 DoublyConnectedEdgeList.h148 行定义.

被这些函数引用 MapGen::GraphParser::GraphParser() , 以及 MapGen::randomize().

+ 这是这个函数的调用关系图:

◆ GetAngle()

float MapGen::DoublyConnectedEdgeList::GetAngle ( const HalfEdge & halfEdge)
static

返回 half-edge 的角度,范围为 [-pi, pi]

在文件 DoublyConnectedEdgeList.cpp247 行定义.

引用了 MapGen::DoublyConnectedEdgeList::Node::GetPosition(), GetSource() , 以及 GetTarget().

被这些函数引用 MapGen::FindPositionInNode() , 以及 MapGen::fixGraphData().

+ 函数调用图:
+ 这是这个函数的调用关系图:

◆ GetFace() [1/2]

static const Face & MapGen::DoublyConnectedEdgeList::GetFace ( const HalfEdge & halfEdge)
inlinestatic

◆ GetFace() [2/2]

static Face & MapGen::DoublyConnectedEdgeList::GetFace ( HalfEdge & halfEdge)
inlinestatic

◆ GetFaces() [1/2]

ListView< FaceIterator > MapGen::DoublyConnectedEdgeList::GetFaces ( )
inline

在文件 DoublyConnectedEdgeList.h190 行定义.

被这些函数引用 MapGen::GraphParser::GraphParser() , 以及 MapGen::randomize().

+ 这是这个函数的调用关系图:

◆ GetFaces() [2/2]

ListView< ConstFaceIterator > MapGen::DoublyConnectedEdgeList::GetFaces ( ) const
inline

在文件 DoublyConnectedEdgeList.h195 行定义.

◆ GetHalfEdge() [1/2]

static const HalfEdge & MapGen::DoublyConnectedEdgeList::GetHalfEdge ( const Face & face)
inlinestatic

◆ GetHalfEdge() [2/2]

static HalfEdge & MapGen::DoublyConnectedEdgeList::GetHalfEdge ( Face & face)
inlinestatic

在文件 DoublyConnectedEdgeList.h269 行定义.

引用了 MapGen::DoublyConnectedEdgeList::Face::HalfEdge.

被这些函数引用 ConnectNodes(), MapGen::getRandomOpposingEdges() , 以及 MapGen::GraphParser::GraphParser().

+ 这是这个函数的调用关系图:

◆ GetHalfEdges() [1/2]

ListView< HalfEdgeIterator > MapGen::DoublyConnectedEdgeList::GetHalfEdges ( )
inline

在文件 DoublyConnectedEdgeList.h180 行定义.

◆ GetHalfEdges() [2/2]

ListView< ConstHalfEdgeIterator > MapGen::DoublyConnectedEdgeList::GetHalfEdges ( ) const
inline

在文件 DoublyConnectedEdgeList.h185 行定义.

◆ GetLeavingHalfEdge() [1/2]

static const HalfEdge & MapGen::DoublyConnectedEdgeList::GetLeavingHalfEdge ( const Node & node)
inlinestatic

◆ GetLeavingHalfEdge() [2/2]

static HalfEdge & MapGen::DoublyConnectedEdgeList::GetLeavingHalfEdge ( Node & node)
inlinestatic

在文件 DoublyConnectedEdgeList.h257 行定义.

引用了 MapGen::DoublyConnectedEdgeList::Node::LeavingHalfEdge.

被这些函数引用 MapGen::fixGraphData().

+ 这是这个函数的调用关系图:

◆ GetNextInFace() [1/2]

static const HalfEdge & MapGen::DoublyConnectedEdgeList::GetNextInFace ( const HalfEdge & halfEdge)
inlinestatic

◆ GetNextInFace() [2/2]

static HalfEdge & MapGen::DoublyConnectedEdgeList::GetNextInFace ( HalfEdge & halfEdge)
inlinestatic

在文件 DoublyConnectedEdgeList.h283 行定义.

引用了 MapGen::DoublyConnectedEdgeList::HalfEdge::Next.

被这些函数引用 ConnectNodes(), MapGen::getRandomOpposingEdges() , 以及 MapGen::GraphParser::GraphParser().

+ 这是这个函数的调用关系图:

◆ GetNextInNode() [1/2]

static const HalfEdge & MapGen::DoublyConnectedEdgeList::GetNextInNode ( const HalfEdge & halfEdge)
inlinestatic

在文件 DoublyConnectedEdgeList.h300 行定义.

◆ GetNextInNode() [2/2]

static HalfEdge & MapGen::DoublyConnectedEdgeList::GetNextInNode ( HalfEdge & halfEdge)
inlinestatic

在文件 DoublyConnectedEdgeList.h295 行定义.

被这些函数引用 MapGen::fixGraphData().

+ 这是这个函数的调用关系图:

◆ GetNodes() [1/2]

ListView< NodeIterator > MapGen::DoublyConnectedEdgeList::GetNodes ( )
inline

在文件 DoublyConnectedEdgeList.h170 行定义.

被这些函数引用 MapGen::fixGraphData().

+ 这是这个函数的调用关系图:

◆ GetNodes() [2/2]

ListView< ConstNodeIterator > MapGen::DoublyConnectedEdgeList::GetNodes ( ) const
inline

在文件 DoublyConnectedEdgeList.h175 行定义.

◆ GetPair() [1/2]

static const HalfEdge & MapGen::DoublyConnectedEdgeList::GetPair ( const HalfEdge & halfEdge)
inlinestatic

◆ GetPair() [2/2]

static HalfEdge & MapGen::DoublyConnectedEdgeList::GetPair ( HalfEdge & halfEdge)
inlinestatic

在文件 DoublyConnectedEdgeList.h233 行定义.

引用了 MapGen::DoublyConnectedEdgeList::HalfEdge::Pair.

被这些函数引用 FHalfEdgeCounter::Insert() , 以及 MapGen::RoadSegmentBuilder::insert().

+ 这是这个函数的调用关系图:

◆ GetSource() [1/2]

static const Node & MapGen::DoublyConnectedEdgeList::GetSource ( const HalfEdge & halfEdge)
inlinestatic

◆ GetSource() [2/2]

static Node & MapGen::DoublyConnectedEdgeList::GetSource ( HalfEdge & halfEdge)
inlinestatic

在文件 DoublyConnectedEdgeList.h209 行定义.

引用了 MapGen::DoublyConnectedEdgeList::HalfEdge::Source.

被这些函数引用 MapGen::RoadSegmentBuilder::Add(), GetAngle(), MapGen::getSourcePosition() , 以及 MapGen::GraphParser::GraphParser().

+ 这是这个函数的调用关系图:

◆ GetTarget() [1/2]

static const Node & MapGen::DoublyConnectedEdgeList::GetTarget ( const HalfEdge & halfEdge)
inlinestatic

◆ GetTarget() [2/2]

static Node & MapGen::DoublyConnectedEdgeList::GetTarget ( HalfEdge & halfEdge)
inlinestatic

在文件 DoublyConnectedEdgeList.h221 行定义.

引用了 MapGen::DoublyConnectedEdgeList::HalfEdge::Target.

被这些函数引用 GetAngle() , 以及 MapGen::getTargetPosition().

+ 这是这个函数的调用关系图:

◆ SplitEdge()

DoublyConnectedEdgeList::Node & MapGen::DoublyConnectedEdgeList::SplitEdge ( const Position & Position,
HalfEdge & HalfEdge )

位置分割 HalfEdge (和它的配对)

时间复杂度为 O(n*log(n)),其中 n 是离开 HalfEdge 源的边数

返回
新生成的节点。

在文件 DoublyConnectedEdgeList.cpp145 行定义.

引用了 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().

+ 函数调用图:
+ 这是这个函数的调用关系图:

类成员变量说明

◆ Faces

FaceContainer MapGen::DoublyConnectedEdgeList::Faces
private

在文件 DoublyConnectedEdgeList.h330 行定义.

被这些函数引用 ConnectNodes() , 以及 DoublyConnectedEdgeList().

◆ HalfEdges

HalfEdgeContainer MapGen::DoublyConnectedEdgeList::HalfEdges
private

在文件 DoublyConnectedEdgeList.h328 行定义.

被这些函数引用 AddNode(), ConnectNodes(), DoublyConnectedEdgeList() , 以及 SplitEdge().

◆ Nodes

NodeContainer MapGen::DoublyConnectedEdgeList::Nodes
private

在文件 DoublyConnectedEdgeList.h326 行定义.

被这些函数引用 AddNode(), DoublyConnectedEdgeList() , 以及 SplitEdge().


该类的文档由以下文件生成: