PixelLightAPI  .
Public Member Functions
PLMath::Graph Class Reference

Graph class (directed) More...

#include <Graph.h>

Inheritance diagram for PLMath::Graph:
Inheritance graph
[legend]

List of all members.

Public Member Functions

PLMATH_API Graph (const PLCore::String &sName="", PLCore::ResourceManager< Graph > *pManager=nullptr)
 Constructor.
virtual PLMATH_API ~Graph ()
 Destructor.
PLMATH_API GraphPathFindShortestPath (PLCore::uint32 nStartNode, PLCore::uint32 nEndNode)
 Returns the shortest path from a node to another.
virtual PLMATH_API Graphoperator= (const Graph &cSource)
virtual PLMATH_API bool Unload () override
 Unloads the loadable.
virtual PLMATH_API PLCore::String GetLoadableTypeName () const override
 Returns the loadable type name.

Detailed Description

Graph class (directed)


Constructor & Destructor Documentation

PLMATH_API PLMath::Graph::Graph ( const PLCore::String sName = "",
PLCore::ResourceManager< Graph > *  pManager = nullptr 
)

Constructor.

Parameters:
[in]sNameResource name to set
[in]pManagerResource manager using this resource, can be a null pointer
virtual PLMATH_API PLMath::Graph::~Graph ( ) [virtual]

Destructor.


Member Function Documentation

PLMATH_API GraphPath* PLMath::Graph::FindShortestPath ( PLCore::uint32  nStartNode,
PLCore::uint32  nEndNode 
)

Returns the shortest path from a node to another.

Parameters:
[in]nStartNodeStart node
[in]nEndNodeEnd node
Returns:
The shortest path from the start node to the end node, a null pointer if no such path exist. (you have do delete this path by yourself!)
Note:
  • Dijkstra's single source shortest path algorithm is used
virtual PLMATH_API Graph& PLMath::Graph::operator= ( const Graph cSource) [virtual]
virtual PLMATH_API bool PLMath::Graph::Unload ( ) [override, virtual]

Unloads the loadable.

Returns:
'true' if all went fine, else 'false'

Reimplemented from PLCore::Loadable.

virtual PLMATH_API PLCore::String PLMath::Graph::GetLoadableTypeName ( ) const [override, virtual]

Returns the loadable type name.

Returns:
The loadable type name

Reimplemented from PLCore::Loadable.


The documentation for this class was generated from the following file:


PixelLight PixelLight 0.9.10-R1
Copyright (C) 2002-2011 by The PixelLight Team
Last modified Fri Dec 23 2011 15:51:19
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported