ecolab Namespace Reference

_OPENMP More...

Classes

struct  Accessor
 
class  affinerand
 scale and translate a random number generator More...
 
struct  array_handler
 
struct  base_map
 
class  BiDirectionalBitRep
 
class  BiDirectionalGraph
 A graph in which each link is bidirectional. More...
 
class  BiDirectionalGraph_const_iterator
 
class  bitref
 
class  BitRep
 
class  bitvect
 
struct  BoundMethodCallable
 whether B's method is callable due to the rules of const-correctness, or due to having lvalue arguments More...
 
struct  BoundMethodCallable< functional::bound_method< C, M > >
 
class  cachedDBM
 persistent map More...
 
class  cachedDBM< char *, char * >
 
class  cachedDBM< char *, val >
 
class  cachedDBM< key, char * >
 
class  cachedDBM_base
 implementation of cacheDBM common to all specialisations More...
 
struct  cachedDBM_string
 
class  Checkpointable_file
 checkpointable binary file writer More...
 
class  cmd_data
 
class  ConcreteGraph
 
class  const_bitref
 
struct  ConstantRNG
 default indegree distribution (builds trees)
 
class  Datum
 
struct  Degrees
 
class  DiGraph
 
struct  DisableEventProcessing
 
class  distrand
 arbitrary distribution generator (Marsaglia method). More...
 
class  eco_strstream
 An EcoLab string stream class. More...
 
struct  Edge
 
class  error
 EcoLab exception class. More...
 
struct  function
 
class  gaussrand
 Gaussian (normal) random generator. More...
 
struct  Graph
 
class  Graph_back_insert_iterator
 
class  GraphAdaptor
 
struct  GraphAdaptor_const_iterator_base
 
class  hash_map
 
struct  HistoGram
 
struct  HistoStats
 Histogramming tool. More...
 
struct  idx
 
struct  idx< const char * >
 
struct  idx< const T >
 
struct  idx< int >
 
struct  idx< long >
 
struct  idx< std::string >
 
struct  idx< unsigned int >
 
struct  idx< unsigned long >
 
class  IGraph
 
struct  IGraphError
 
struct  is_map
 distinguish between maps and sets based on value_type of container More...
 
struct  is_map< std::map< K, V, C, A > >
 
struct  is_map_map
 
class  iter
 
struct  KeyName
 
struct  KeyName< std::pair< K, V > >
 
class  limited_set
 
struct  member_entry
 
struct  member_entry< const classdesc::Enum_handle< const T > >
 
struct  member_entry< const classdesc::Enum_handle< T > >
 
struct  member_entry< const T >
 
struct  member_entry< const void * >
 
struct  member_entry< ecolab::TCL_obj_ref< T > >
 
struct  member_entry< std::vector< bool >::reference >
 
struct  member_entry< T * >
 
struct  member_entry< void * >
 
struct  member_entry< void >
 
struct  member_entry_base
 
class  NautyRep
 
struct  NetworkFromTimeSeries
 
class  NewTCL_obj_functor
 
class  NewTCL_static_functor
 
class  palette_class
 A class for accessing the palette TCL variable, which is a list of colours. More...
 
class  Pango
 
class  Plot
 
class  random_gen
 abstract base class for representing random number generators More...
 
struct  read_lock
 
class  ref
 
class  Rep_const_iterator
 An iterator suitable for "duck-typing" with Graph. More...
 
struct  ResizeFunctor
 
class  RWlock
 
struct  SortElapsed
 
struct  sortPair
 
class  sparse_mat
 sparse matrix class More...
 
class  sparse_mat_graph
 
class  sparse_mat_graph_adaptor
 
struct  Stats
 elementary statistics More...
 
struct  TCL_accessor
 for accessors (overloaded getter/setters that pretend to be attributes) More...
 
struct  TCL_accessor< const F >
 const version - only getter is called More...
 
class  TCL_args
 Represent arguments to TCL commands. More...
 
struct  TCL_obj_checkr
 
struct  TCL_obj_checkr_base
 
struct  TCL_obj_functor
 
struct  TCL_obj_functor< C, void >
 
struct  TCL_obj_functor< const C, T >
 
class  TCL_obj_of
 
struct  TCL_obj_of< const std::vector< bool >, idx_t >
 
class  TCL_obj_of< GRAPHCODE_NS::omap, GRAPHCODE_NS::GraphID_t >
 
struct  TCL_obj_of< std::vector< bool >, idx_t >
 
class  TCL_obj_of< T, iter >
 
class  TCL_obj_of_base
 
class  TCL_obj_of_count
 
class  TCL_obj_of_vector_bool
 
class  TCL_obj_ref
 a slightly safer way of referring to registered objects than bare pointers More...
 
class  tclcmd
 
class  tclindex
 
class  TCLObjRef
 RAII TCL_Obj ref. More...
 
class  tclpp_cd
 
class  tclreturn
 An RAII class for returning values to TCL. More...
 
class  tclvar
 TCL variable class. More...
 
class  Timer
 RAII class for timing code blocks. More...
 
struct  Times
 
class  unuran
 universal non-uniform random generator More...
 
class  urand
 
struct  write_lock
 

Typedefs

typedef unsigned long setword
 
typedef std::map< string, classdesc::shared_ptr< member_entry_base > > TCL_obj_hash
 

Functions

template<class charT , class Traits >
std::basic_ostream< charT, Traits > & operator<< (std::basic_ostream< charT, Traits > &o, const Stats &x)
 
template<class T , class charT , class Traits >
std::basic_ostream< charT, Traits > & operator<< (std::basic_ostream< charT, Traits > &o, const T &x)
 
std::ostream & operator<< (std::ostream &x, const eco_strstream &y)
 
void swap (DiGraph &x, DiGraph &y)
 
void swap (BiDirectionalGraph &x, BiDirectionalGraph &y)
 
template<class G >
Degrees degrees (const G &g)
 
void ErdosRenyi_generate (Graph &g, unsigned nodes, unsigned links, urand &uni, random_gen &weight_dist=one)
 random graph chosen uniformly from the set of graphs with n nodes and l links
 
void PreferentialAttach_generate (Graph &g, unsigned nodes, urand &uni, random_gen &indegree_dist=one, random_gen &weight_dist=one)
 
void random_rewire (Graph &g, urand &u)
 randomly rewire the graph g (in place), using random generator u
 
unsigned SETWD (unsigned pos)
 
unsigned SETBT (unsigned pos)
 
setword BITMASK (unsigned x)
 
void ADDELEMENT (setword *setadd, unsigned pos)
 
void DELELEMENT (setword *setadd, unsigned pos)
 
void FLIPELEMENT (setword *setadd, unsigned pos)
 
bool ISELEMENT (const setword *setadd, unsigned pos)
 
void EMPTYSET (setword *setadd, unsigned m)
 
template<class T >
void iota (typename T::iterator p, const typename T::iterator &end, typename T::value_type val)
 
void iota (vector< unsigned >::iterator p, const vector< unsigned >::iterator &end, unsigned val)
 
void iota (unsigned *p, const unsigned *end, unsigned val)
 
bitvect num (const bitvect &x, unsigned i, unsigned nbits)
 
template<class T , class U >
void asgRep (T &x, const U &y)
 
template<class T , class Graph >
void asgRepGraph (T &x, const Graph &y)
 convert between an EcoLab Graph type and a BitRep type
 
BitRep permute (const BitRep &x, const vector< unsigned > &perm)
 
void ecolab_nauty (const NautyRep &g, NautyRep &canonical, double &lnomega, bool do_canonical, int invMethod=0)
 EcoLab interface to Nauty. More...
 
double saucy_lnomega (const DiGraph &)
 
double igraph_lnomega (const DiGraph &g, int method)
 
NautyRep canonicalise (const NautyRep &x)
 
BitRep start_perm (unsigned nodes, unsigned links)
 
double lnfactorial (unsigned x)
 
double lnCombine (unsigned x, unsigned y)
 
double baseComplexity (unsigned n, unsigned l, bool bidirectional=false)
 
double complexity (NautyRep x, bool bidirectional=false)
 
double canonical (BitRep &canon, const Graph &g)
 SuperNOVA automorphism algorithm: More...
 
template<class G >
double canonical (BitRep &canon, const GraphAdaptor< G > &g)
 
template<class G >
double canonical (BitRep &canon, const ConcreteGraph< G > &g)
 
template<class G >
double canonical (BitRep &canon, const G &g)
 
setword bitrange (unsigned i)
 
template<class T >
vector< T > num (const vector< T > &x, unsigned start, unsigned nbits)
 
bool equal (const bitvect &x, const bitvect &y, unsigned len, unsigned offs)
 
template<class T >
bool equal (const T &x, const T &y, unsigned len, unsigned offs)
 
template<class T >
void setvec (vector< T > &x, const bitvect &y)
 
double ODcomplexity (const DiGraph &x)
 Offdiagonal complexity.
 
double MA (const DiGraph &x)
 Medium articulation.
 
sparse_mat tr (const sparse_mat &x)
 transpose matrix
 
void interpExitProc (ClientData cd)
 
Tcl_Interp * interp ()
 default interpreter. Set to NULL when interp() is destroyed
 
int TCL_newcommand (const char *c)
 test whether command is not already defined
 
int TCL_proc (ClientData cd, Tcl_Interp *interp, int argc, CONST84 char **argv)
 
int setEcoLabLib (const char *path)
 set the value of the TCL variable ecolab_library
 
bool exists (const tclvar &x)
 Check if a TCL variable exists.
 
std::ostream & operator<< (std::ostream &stream, tclvar x)
 
std::string chomp (const std::string &s)
 
template<class T >
void ensure_exists (T *&x)
 
int TCL_oproc (ClientData cd, Tcl_Interp *interp, int argc, Tcl_Obj *const argv[])
 
void TCL_delete (ClientData cd)
 
void TCL_cmd_data_delete (ClientData cd)
 
template<class T >
TCL_argsoperator>> (TCL_args &a, T &x)
 
template<>
TCL_argsoperator>> (TCL_args &a, char *&x)
 
template<>
TCL_argsoperator>> (TCL_args &a, const char *&x)
 
void parallel (TCL_args args)
 parallel declarator support for TCL_args
 
TCL_obj_hash & TCL_obj_properties ()
 
void eraseAllNamesStartingWith (const string &name)
 
template<class T >
void TCL_obj (TCL_obj_t &, const string &, T &)
 
template<class T >
void TCL_obj_onbase (TCL_obj_t &, const string &, T &)
 
template<class A1 , class A2 , class R >
void pack (classdesc::pack_t &targ, const classdesc::string &desc, std::binary_function< A1, A2, R > &arg)
 
template<class A1 , class A2 , class R >
void unpack (classdesc::pack_t &targ, const classdesc::string &desc, std::binary_function< A1, A2, R > &arg)
 
template<class A , class R >
void pack (classdesc::pack_t &targ, const classdesc::string &desc, std::unary_function< A, R > &arg)
 
template<class A , class R >
void unpack (classdesc::pack_t &targ, const classdesc::string &desc, std::unary_function< A, R > &arg)
 
template<class C >
classdesc::enable_if< classdesc::is_container< C > >::T pack (classdesc::pack_t &b, const classdesc::string &d, typename C::iterator &a)
 
template<class C >
classdesc::enable_if< classdesc::is_container< C > >::T unpack (classdesc::pack_t &b, const classdesc::string &d, typename C::iterator &a)
 
template<class T , class CharT , class Traits >
enable_if< And< Not< is_enum< T > >, Not< is_container< T > > >, std::basic_istream< CharT, Traits > & >::T operator>> (std::basic_istream< CharT, Traits > &x, T &y)
 
template<class T , class CharT , class Traits >
enable_if< is_sequence< T >, std::basic_istream< CharT, Traits > & >::T operator>> (std::basic_istream< CharT, Traits > &x, T &y)
 
template<class T , class CharT , class Traits >
enable_if< is_associative_container< T >, std::basic_istream< CharT, Traits > & >::T operator>> (std::basic_istream< CharT, Traits > &x, T &y)
 
template<class T , class CharT , class Traits >
enable_if< is_enum< T >, std::basic_istream< CharT, Traits > & >::T operator>> (std::basic_istream< CharT, Traits > &x, T &y)
 
template<class T , class CharT , class Traits >
std::basic_istream< CharT, Traits > & operator>> (std::basic_istream< CharT, Traits > &, ref< T > &y)
 
template<class T >
void TCL_obj_register (const TCL_obj_t &targ, const string &desc, T &arg, bool base=false)
 
void TCL_obj_deregister (const string &desc)
 
template<class T >
void TCL_obj_custom_register (const string &desc, T &arg)
 a 'hook' to allow registrations to occur for TCL_objects (overriding base classes)
 
template<class T >
void TCL_obj (TCL_obj_t &targ, const string &desc, classdesc::is_array ia, T &arg, int dims,...)
 
template<class T >
void TCL_obj (TCL_obj_t &targ, const string &desc, classdesc::is_const_static s, const T &t)
 
template<class T , class U >
void TCL_obj (TCL_obj_t &targ, const string &desc, classdesc::is_const_static s, const T &t, U u)
 const static method support
 
template<class T >
void TCL_obj (TCL_obj_t &targ, const string &desc, classdesc::is_treenode dum, T &arg)
 
template<class T >
void TCL_obj (TCL_obj_t &targ, const string &desc, classdesc::is_graphnode dum, T &arg)
 
template<class B , class A >
enable_if< And< Not< is_void< typename Return< B >::T > >, BoundMethodCallable< B > >, void >::T newTCL_obj_functor_proc (B bm, A args, dummy< 0 > x=0)
 
template<class B , class A >
enable_if< And< is_void< typename Return< B >::T >, BoundMethodCallable< B > >, void >::T newTCL_obj_functor_proc (B bm, A args, dummy< 1 > x=0)
 
template<class B , class A >
enable_if< Not< BoundMethodCallable< B > >, void >::T newTCL_obj_functor_proc (B bm, A args, dummy< 2 > x=0)
 
template<class C , class M >
enable_if< is_member_function_pointer< M >, void >::T TCL_obj (TCL_obj_t &targ, const string &desc, C &c, M m)
 
template<class C , class M >
enable_if< functional::is_nonmember_function_ptr< M >, void >::T TCL_obj (TCL_obj_t &targ, const string &desc, C &c, M m)
 
template<class C , class T >
void TCL_obj (TCL_obj_t &targ, const string &desc, C &obj, T(C::*arg)(int, const char **))
 
template<class C , class T >
void TCL_obj (TCL_obj_t &targ, const string &desc, C &obj, T(C::*arg)(int, char **))
 
template<class C , class T >
void TCL_obj (TCL_obj_t &targ, const string &desc, C &obj, T(*arg)(int argc, const char **))
 
template<class C , class T >
void TCL_obj (TCL_obj_t &targ, const string &desc, C &obj, T(*arg)(int argc, char **))
 
template<class C , class T >
void TCL_obj (TCL_obj_t &targ, const string &desc, C &obj, T(C::*arg)(TCL_args))
 
template<class C , class T >
void TCL_obj (TCL_obj_t &targ, const string &desc, C &obj, T(*arg)(TCL_args))
 
template<class C , class T >
void TCL_obj (TCL_obj_t &targ, const string &desc, C &obj, T(*arg)(const TCL_args &))
 
template<class T >
void TCL_obj (TCL_obj_t &t, const string &d, const Enum_handle< T > &a)
 
void keys_of (const GRAPHCODE_NS::omap &o)
 
void TCL_obj (TCL_obj_t &targ, const string &desc, GRAPHCODE_NS::omap &arg)
 
int null_proc ()
 
template<class T >
std::string quoteTCL (const T &x)
 
template<class F , class S >
std::ostream & operator<< (std::ostream &o, const std::pair< F, S > &p)
 
template<class T >
std::ostream & ContainerOut (std::ostream &o, const T &c)
 
template<class T >
std::istream & ContainerIn (std::istream &i, T &c)
 
template<class T , class CharT , class Traits >
enable_if< is_container< T >, std::ostream & >::T operator<< (std::basic_ostream< CharT, Traits > &o, const T &v)
 
template<class T >
enable_if< is_container< T >, eco_strstream & >::T operator| (eco_strstream &s, const T &x)
 
template<class T >
enable_if< Not< is_map< T > >, typename T::value_type >::T readIn (std::istream &i)
 
template<class T >
enable_if< is_map< T >, typename T::value_type >::T readIn (std::istream &i)
 
template<class T >
enable_if< is_map< T >, void >::T keys_of (const T &o)
 
template<class T >
enable_if< Not< is_map< T > >, void >::T keys_of (const T &o)
 
template<class T >
enable_if< is_map< T >, TCL_obj_of< T, typename T::key_type > * >::T makeTCL_obj_of (T &o, const string &d)
 
template<class T >
enable_if< Not< is_map< T > >, TCL_obj_of< T, iter > * >::T makeTCL_obj_of (T &o, const string &d)
 
template<class V >
void TCL_obj_const_sequence (TCL_obj_t &targ, const string &desc, V &arg)
 
template<class V >
void TCL_obj_const_vector (TCL_obj_t &targ, const string &desc, V &arg)
 
template<class V >
void TCL_obj_sequence (TCL_obj_t &targ, const string &desc, V &arg)
 
template<class T , class A >
void TCL_obj_sequence (TCL_obj_t &targ, const string &desc, std::vector< T, A > &arg)
 
template<class T , class A >
void TCL_obj_sequence (TCL_obj_t &targ, const string &desc, const std::vector< T, A > &arg)
 
template<class T >
void TCL_obj_associative_container (TCL_obj_t &targ, const string &desc, T &arg)
 
template<class T >
enable_if< is_sequence< T >, void >::T TCL_objp (TCL_obj_t &t, const classdesc::string &desc, T &arg, dummy< 1 > d=0)
 
template<class T >
enable_if< is_associative_container< T >, void >::T TCL_objp (TCL_obj_t &t, const classdesc::string &desc, T &arg, dummy< 2 > d=0)
 
template<class T >
enable_if< Not< is_container< T > >, void >::T TCL_objp (TCL_obj_t &t, const classdesc::string &desc, T &arg, dummy< 0 > d=0)
 
template<class T >
int TCL_obj_init (T &x)
 
template<class T >
void tclret (const T &)
 
void tclret (const char &x)
 
void tclret (const signed char &x)
 
void tclret (const unsigned char &x)
 
void tclret (const int &x)
 
void tclret (const unsigned int &x)
 
void tclret (const long &x)
 
void tclret (const unsigned long &x)
 
void tclret (const short &x)
 
void tclret (const unsigned short &x)
 
void tclret (const bool &x)
 
void tclret (const float &x)
 
void tclret (const double &x)
 
void tclret (const long double &x)
 
template<class T >
void asgtclret (T &x, TCL_args &y)
 
void asgtclret (int &x, TCL_args &y)
 
void asgtclret (unsigned int &x, TCL_args &y)
 
void asgtclret (long &x, TCL_args &y)
 
void asgtclret (bool &x, TCL_args &y)
 
void asgtclret (float &x, TCL_args &y)
 
void asgtclret (double &x, TCL_args &y)
 
template<class T >
bool is_simpletype (const T &x)
 
bool is_simpletype (const char &x)
 
bool is_simpletype (const signed char &x)
 
bool is_simpletype (const unsigned char &x)
 
bool is_simpletype (const int &x)
 
bool is_simpletype (const unsigned int &x)
 
bool is_simpletype (const long &x)
 
bool is_simpletype (const unsigned long &x)
 
bool is_simpletype (const short &x)
 
bool is_simpletype (const unsigned short &x)
 
bool is_simpletype (const bool &x)
 
bool is_simpletype (const float &x)
 
bool is_simpletype (const double &x)
 
bool is_simpletype (const long double &x)
 
template<class T , class CharT , class Traits >
classdesc::enable_if< And< classdesc::Not< classdesc::is_enum< T > >, Not< is_container< T > > >, std::basic_istream< CharT, Traits > & >::T operator>> (std::basic_istream< CharT, Traits > &x, T &y)
 
template<class T , class CharT , class Traits >
classdesc::enable_if< classdesc::is_enum< T >, std::basic_istream< CharT, Traits > & >::T operator>> (std::basic_istream< CharT, Traits > &x, T &y)
 
template<class T >
std::istream & operator>> (std::istream &i, ecolab::ref< T > &a)
 
template<class T >
eco_strstreamoperator| (eco_strstream &o, ecolab::ref< T > &a)
 
std::map< std::string, Times > & timers ()
 
void start_timer (const std::string &s)
 
void stop_timer (const std::string &s)
 
void print_timers ()
 
double complexity (const Graph &g)
 Network complexity.
 
template<class G >
double complexity (const GraphAdaptor< G > &g)
 
template<class G >
double complexity (const ConcreteGraph< G > &g)
 
template<class G >
double complexity (const G &g)
 

Variables

urand array_urand
 
gaussrand array_grand
 
const setword MSK64 =0xFFFFFFFFFFFFFFFFUL
 
const setword MSK63C =0x7FFFFFFFFFFFFFFFUL
 
const setword ALLBITS =MSK64
 
const setword bitt []
 
cairo::Colour palette []
 
const int paletteSz
 
bool interpExiting
 
unsigned myid
 main window of application More...
 
unsigned nprocs
 
int processEventsNest
 
classdesc::TCL_obj_t null_TCL_obj
 a null TCL_obj_t suitable for nothing if needed.
 

Detailed Description

_OPENMP

An EcoLab graph adaptor for igraph objects

Function Documentation

◆ canonical()

double ecolab::canonical ( BitRep canon,
const Graph g 
)

SuperNOVA automorphism algorithm:

Parameters
canoncanonical form of the input graph, including a reordered attribute vector
ginput graph
Returns
the ln omega of the graph

Referenced by ecolab::GraphAdaptor< ecolab::DiGraph >::directed().

◆ ecolab_nauty()

void ecolab::ecolab_nauty ( const NautyRep g,
NautyRep canonical,
double &  lnomega,
bool  do_canonical,
int  invMethod = 0 
)

EcoLab interface to Nauty.

Parameters
gGraph the analyse
canonicalreturned canonical representation
lnomega$\ln\Omega$
do_canonicalwhether to compute a canonical rep, or just $\ln\Omega$

Referenced by ecolab::GraphAdaptor< ecolab::DiGraph >::directed().

◆ PreferentialAttach_generate()

void ecolab::PreferentialAttach_generate ( Graph g,
unsigned  nodes,
urand uni,
random_gen indegree_dist = one,
random_gen weight_dist = one 
)

Barabasi-Albert Preferential Attachment model. indegree_dist is the distribution from which the in degree is drawn for each new node.

◆ start_timer()

void ecolab::start_timer ( const std::string &  s)
inline

start the named timer. This call is threadsafe in an OpenMP parallel region.

References timers().

◆ stop_timer()

void ecolab::stop_timer ( const std::string &  s)
inline

stop the named timer. This call is threadsafe in an OpenMP parallel region.

References timers().

◆ TCL_obj()

template<class C , class T >
void ecolab::TCL_obj ( TCL_obj_t targ,
const string &  desc,
C &  obj,
T(C::*)(int, const char **)  arg 
)

methods with signature (int,char**) or TCL_args can be used to handle methods with variable arguments, or ones with reference arguments

◆ timers()

std::map<std::string, Times>& ecolab::timers ( )
inline

return the static timer map. The first call to this method creates the the map, and is not threadsafe. Using the returned map directly is not threadsafe.

Referenced by start_timer(), and stop_timer().

Variable Documentation

◆ bitt

const setword ecolab::bitt[]
Initial value:
= {01000000000000000000000,0400000000000000000000,
0200000000000000000000,0100000000000000000000,
040000000000000000000,020000000000000000000,
010000000000000000000,04000000000000000000,
02000000000000000000,01000000000000000000,
0400000000000000000,0200000000000000000,
0100000000000000000,040000000000000000,020000000000000000,
010000000000000000,04000000000000000,02000000000000000,
01000000000000000,0400000000000000,0200000000000000,
0100000000000000,040000000000000,020000000000000,
010000000000000,04000000000000,02000000000000,
01000000000000,0400000000000,0200000000000,0100000000000,
040000000000,020000000000,010000000000,04000000000,
02000000000,01000000000,0400000000,0200000000,0100000000,
040000000,020000000,010000000,04000000,02000000,01000000,
0400000,0200000,0100000,040000,020000,010000,04000,
02000,01000,0400,0200,0100,040,020,010,04,02,01}

◆ myid

◆ processEventsNest

int ecolab::processEventsNest

semaphore controlling background event process during command execution. When zero, background events are processed

Referenced by interp().