NPL
Neurological Programs and Libraries
npl::Graph< T > Class Template Reference

#include <graph.h>

Public Member Functions

 Graph ()
 
 Graph (std::string filename, bool typefail=true)
 
 Graph (size_t nodes)
 
 Graph (Graph &&other)
 
 Graph (const Graph &other)
 
 Graph (size_t nodes, void *data, std::function< void(void *)> deleter=[](void *){})
 
 ~Graph ()
 
void init (size_t nodes)
 
void init (size_t nodes, void *data, std::function< void(void *)> deleter=[](void *){})
 
Graphoperator= (Graph< T > &&other)
 
T & operator() (size_t from, size_t to)
 
const T & operator() (size_t from, size_t to) const
 
size_t nodes () const
 
const std::string & name (size_t ii) const
 
std::string & name (size_t ii)
 
void load (std::string filename, bool typefail=true)
 
void save (std::string filename, GraphStoreT store=G_STORE_FULLMAT)
 
void normalize ()
 
double assortativity () const
 
double assortativity_wei () const
 
strength () const
 
std::vector< T > strengths () const
 
std::vector< T > strengths (std::vector< T > &is, std::vector< T > &os) const
 
int degree () const
 
std::vector< int > degrees () const
 
std::vector< int > degrees (std::vector< int > &is, std::vector< int > &os) const
 
std::vector< int > betweenness_centrality () const
 
std::vector< int > betweenness_centrality_next () const
 
void shortest (Graph< T > &sdist) const
 
void shortest (Graph< int > &next, Graph< T > &sdist) const
 

Static Public Member Functions

static GraphDataT type ()
 
static std::string typestr ()
 
static Graph< T > Coxeter ()
 
static Graph< T > PreRandom ()
 

Detailed Description

template<typename T>
class npl::Graph< T >

Definition at line 61 of file graph.h.

Constructor & Destructor Documentation

template<typename T>
npl::Graph< T >::Graph ( )
template<typename T>
npl::Graph< T >::Graph ( std::string  filename,
bool  typefail = true 
)
template<typename T>
npl::Graph< T >::Graph ( size_t  nodes)
template<typename T>
npl::Graph< T >::Graph ( Graph< T > &&  other)
template<typename T>
npl::Graph< T >::Graph ( const Graph< T > &  other)
template<typename T>
npl::Graph< T >::Graph ( size_t  nodes,
void *  data,
std::function< void(void *)>  deleter = [](void *){} 
)
template<typename T>
npl::Graph< T >::~Graph ( )
inline

Definition at line 71 of file graph.h.

Member Function Documentation

template<typename T>
double npl::Graph< T >::assortativity ( ) const
template<typename T>
double npl::Graph< T >::assortativity_wei ( ) const
template<typename T>
std::vector<int> npl::Graph< T >::betweenness_centrality ( ) const
template<typename T>
std::vector<int> npl::Graph< T >::betweenness_centrality_next ( ) const
template<typename T>
static Graph<T> npl::Graph< T >::Coxeter ( )
static
template<typename T>
int npl::Graph< T >::degree ( ) const
template<typename T>
std::vector<int> npl::Graph< T >::degrees ( ) const
template<typename T>
std::vector<int> npl::Graph< T >::degrees ( std::vector< int > &  is,
std::vector< int > &  os 
) const
template<typename T>
void npl::Graph< T >::init ( size_t  nodes)
template<typename T>
void npl::Graph< T >::init ( size_t  nodes,
void *  data,
std::function< void(void *)>  deleter = [](void *){} 
)
template<typename T>
void npl::Graph< T >::load ( std::string  filename,
bool  typefail = true 
)
template<typename T>
const std::string& npl::Graph< T >::name ( size_t  ii) const
inline

Definition at line 94 of file graph.h.

template<typename T>
std::string& npl::Graph< T >::name ( size_t  ii)
inline

Definition at line 95 of file graph.h.

template<typename T>
size_t npl::Graph< T >::nodes ( ) const
inline

Definition at line 92 of file graph.h.

template<typename T>
void npl::Graph< T >::normalize ( )
template<typename T>
T& npl::Graph< T >::operator() ( size_t  from,
size_t  to 
)
inline

Definition at line 82 of file graph.h.

template<typename T>
const T& npl::Graph< T >::operator() ( size_t  from,
size_t  to 
) const
inline

Definition at line 87 of file graph.h.

template<typename T>
Graph& npl::Graph< T >::operator= ( Graph< T > &&  other)
template<typename T>
static Graph<T> npl::Graph< T >::PreRandom ( )
static
template<typename T>
void npl::Graph< T >::save ( std::string  filename,
GraphStoreT  store = G_STORE_FULLMAT 
)
template<typename T>
void npl::Graph< T >::shortest ( Graph< T > &  sdist) const
template<typename T>
void npl::Graph< T >::shortest ( Graph< int > &  next,
Graph< T > &  sdist 
) const
template<typename T>
T npl::Graph< T >::strength ( ) const
template<typename T>
std::vector<T> npl::Graph< T >::strengths ( ) const
template<typename T>
std::vector<T> npl::Graph< T >::strengths ( std::vector< T > &  is,
std::vector< T > &  os 
) const
template<typename T>
static GraphDataT npl::Graph< T >::type ( )
inlinestatic

Definition at line 100 of file graph.h.

template<typename T>
static std::string npl::Graph< T >::typestr ( )
inlinestatic

Definition at line 101 of file graph.h.


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