The namespace containing all graphlab objects and functions. More...
Namespaces | |
| namespace | distributed_engine_factory |
| namespace | engine_factory |
| namespace | random |
Classes | |
| struct | distributed_types |
| A types datastructure which provides convenient specializations of all user-facing GraphLab types. More... | |
| class | core |
| A GraphLab core is the base (or core) data structure in GraphLab. More... | |
| class | distributed_chromatic_engine |
| class | distributed_glshared_base |
| class | distributed_glshared_manager |
| class | distributed_locking_engine |
| class | dgraph_edge_list |
| class | distributed_graph |
| Distributed Graph Implementation. More... | |
| class | graph_lock |
| class | distributed_core |
| A GraphLab core is the base (or core) data structure in GraphLab. More... | |
| class | asynchronous_engine |
| class | engine_options |
| class | iengine |
| The abstract interface of a GraphLab engine. The graphlab engine interface describes the core functionality provided by all graphlab engines. The engine is templatized over the type of graph. More... | |
| class | binary_factor |
| class | discrete_domain |
| class | discrete_variable |
| class | fast_discrete_assignment |
| class | table_factor |
| class | unary_factor |
| struct | atom_index_file |
| class | disk_atom |
| class | disk_graph |
| GraphLab disk based Graph container templatized over the vertex and edge types. More... | |
| struct | partition_method |
| the partitioning methods. More... | |
| class | edge_list |
| class | graph |
| The GraphLab primary Graph container templatized over the vertex and edge types. More... | |
| class | igraph_constructor |
| class | metrics |
| class | monitor_multiplexer |
| multiplexing monitor More... | |
| class | atomic |
| atomic object toolkitA templated class for creating atomic numbers. More... | |
| class | intention_lock |
| class | mutex |
| class | spinlock |
| class | simple_spinlock |
| class | conditional |
| class | semaphore |
| class | spinrwlock |
| class | rwlock |
| class | barrier |
| class | thread |
| class | thread_group |
| class | queued_rw_lock |
| class | async_consensus |
| class | caching_dht |
| class | circular_char_buffer |
| struct | circular_char_buffer_source |
| struct | circular_char_buffer_sink |
| class | coherent_dht |
| struct | dc_init_param |
| class | distributed_control |
| class | dc_dist_object |
| class | dc_services |
| class | dht |
| class | lazy_dht |
| class | chromatic_scheduler |
| class | clustered_priority_scheduler |
| class | icallback |
| struct | sched_status |
| struct | scheduler_options_enum |
| class | ischeduler |
| class | multiqueue_fifo_scheduler |
| class | round_robin_scheduler |
| class | scheduler_options |
| class | set_scheduler |
| class | binary_scheduler_callback |
| class | direct_callback |
| class | general_scope |
| struct | scope_range |
| defines the types of scope consistency guarantees provided More... | |
| class | iscope |
| represents the data associated with a vertex its adjacent edges and neighbors. More... | |
| class | synchronous_scope |
| class | synchronous_scope_factory |
| class | iarchive |
| class | iarchive_soft_fail |
| class | oarchive |
| class | oarchive_soft_fail |
| class | __podify__ |
| class | glshared_base |
| class | glshared |
| A shared data entry. More... | |
| class | glshared_const |
| A constant shared data entry. More... | |
| struct | glshared_apply_ops |
| struct | glshared_sync_ops |
| struct | glshared_merge_ops |
| class | binary_input_stream |
| class | binary_output_stream |
| class | blocking_queue |
| Implements a blocking queue useful for producer/consumer models. More... | |
| struct | char_counting_sink |
| class | command_line_options |
| class | controlled_termination |
| class | dense_bitset |
| class | fixed_dense_bitset |
| class | any |
| class | blob |
| class | identity_hash |
| class | lazy_deque |
| class | multi_blocking_queue |
| Implements a blocking queue useful for producer/consumer models. More... | |
| class | mutable_queue |
| class | resizing_array_sink_ref |
| class | safe_circular_char_buffer |
| class | sampling_tree |
| class | shared_termination |
| class | small_set |
| class | synchronized_circular_queue |
| class | task_count_termination |
| class | timer |
| union | gl_uint128_t |
| struct | types |
| A types datastructure which provides convenient specializations of all user-facing GraphLab types. More... | |
Typedefs | |
| typedef std::vector< double >(* | global_dumper )(blob_graph &g) |
| typedef uint32_t | vertex_id_t |
| The type of a vertex is a simple size_t. | |
| typedef uint32_t | edge_id_t |
| The type of an edge id. | |
| typedef uint8_t | vertex_color_type |
| Type for vertex colors. | |
| typedef mutex | spinlock |
| if spinlock not supported, it is typedef it to a mutex. | |
| typedef uint16_t | procid_t |
| The type used for numbering processors. | |
| typedef boost::iostreams::stream < charstream_impl::resizing_array_sink < true > > | charstream |
| typedef __any_placeholder *(* | __any_registration_deserializer_type )(iarchive_soft_fail &arc) |
|
typedef std::map< uint64_t, __any_registration_deserializer_type > | __any_registration_map_type |
|
typedef charstream_impl::resizing_array_sink < false > | resizing_array_sink |
Enumerations | |
| enum | exec_status { EXEC_UNSET, EXEC_TASK_DEPLETION, EXEC_TERM_FUNCTION, EXEC_TIMEOUT, EXEC_TASK_BUDGET_EXCEEDED, EXEC_FORCED_ABORT, EXEC_EXCEPTION } |
the reasons for execution completion. More... | |
| enum | metrictype { REAL, INTEGER, TIME, STRING, VECTOR } |
| enum | dc_comm_type { TCP_COMM, SCTP_COMM } |
Functions | |
| std::vector< std::string > | get_distributed_scheduler_names () |
| get all the scheduler names | |
| std::string | get_distributed_scheduler_names_str () |
| get all the scheduler names concated into a string | |
| void | print_distributed_scheduler_info (std::string s, std::ostream &out) |
| Display the scheduler options for a particular scheduler. | |
| template<typename VertexData , typename EdgeData > | |
| std::ostream & | operator<< (std::ostream &out, const distributed_graph< VertexData, EdgeData > &graph) |
|
std::vector< std::vector < size_t > > | partition_atoms_sliced (const atom_index_file &atomindex, size_t nparts) |
|
std::vector< std::vector < size_t > > | partition_atoms (const atom_index_file &atomindex, size_t nparts) |
| template<typename VertexData , typename EdgeData > | |
| void | graph_partition_to_atomindex (graph< VertexData, EdgeData > &g, std::vector< vertex_id_t > &parts, std::string basename) |
| template<typename VertexData , typename EdgeData > | |
| std::ostream & | operator<< (std::ostream &out, const graph< VertexData, EdgeData > &graph) |
| template<typename GraphConstructor , typename VertexData , typename EdgeData > | |
| void | mr_disk_graph_construction (distributed_control &dc, GraphConstructor &gc, size_t max_per_node, std::string outputbasename, size_t numatoms) |
| template<typename T > | |
| bool | atomic_compare_and_swap (T &a, const T &oldval, const T &newval) |
| template<typename T > | |
| bool | atomic_compare_and_swap (volatile T &a, const T &oldval, const T &newval) |
| template<> | |
| bool | atomic_compare_and_swap (double &a, const double &oldval, const double &newval) |
| template<> | |
| bool | atomic_compare_and_swap (float &a, const float &oldval, const float &newval) |
| template<typename T > | |
| void | atomic_exchange (T &a, T &b) |
| Atomically exchanges the values of a and b. | |
| template<typename T > | |
| T | fetch_and_store (T &a, const T &newval) |
| Atomically sets a to the newval, returning the old value. | |
| void | prefetch_range (void *addr, size_t len) |
| void | prefetch_range_write (void *addr, size_t len) |
| thread | launch_in_new_thread (const boost::function< void(void)> &f, size_t cpuid=size_t(-1)) |
| Runs f in a new thread. convenience function for creating a new thread quickly. | |
| bool | init_param_from_env (dc_init_param ¶m) |
| bool | init_param_from_mpi (dc_init_param ¶m, dc_comm_type commtype=TCP_COMM) |
| void | reply_increment_counter (distributed_control &dc, procid_t src, size_t ptr, dc_impl::blob ret) |
| std::vector< std::string > | get_scheduler_names () |
| get all the scheduler names | |
| std::string | get_scheduler_names_str () |
| get all the scheduler names concated into a string | |
| void | print_scheduler_info (std::string s, std::ostream &out) |
| Display the scheduler options for a particular scheduler. | |
| std::ostream & | operator<< (std::ostream &out, const graphlab::scheduler_options &opts) |
| scope_range::lock_type_enum | central_vertex_lock_type (scope_range::scope_range_enum srange) |
| scope_range::lock_type_enum | adjacent_vertex_lock_type (scope_range::scope_range_enum srange) |
| bool | scope_is_subset_of (scope_range::scope_range_enum A, scope_range::scope_range_enum B) |
| template<typename T > | |
| iarchive & | operator>> (iarchive &a, T &i) |
| template<typename T > | |
| iarchive_soft_fail & | operator>> (iarchive_soft_fail &a, T &i) |
| iarchive & | deserialize (iarchive &a, void *const i, const size_t length) |
| iarchive_soft_fail & | deserialize (iarchive_soft_fail &a, void *const i, const size_t length) |
| unsigned char | compress_int (uint64_t u, char output[10]) |
| template<typename IntType > | |
| void | decompress_int (const char *arr, IntType &ret) |
| template<typename IntType > | |
| void | decompress_int_from_ref (const char *&arr, IntType &ret) |
| template<typename IntType > | |
| void | decompress_int (std::istream &strm, IntType &ret) |
| template<typename ArcType , typename RandomAccessIterator > | |
| void | serialize_iterator (ArcType &a, RandomAccessIterator begin, RandomAccessIterator end) |
| template<typename ArcType , typename InputIterator > | |
| void | serialize_iterator (ArcType &a, InputIterator begin, InputIterator end, size_t vsize) |
| template<typename ArcType , typename T , typename OutputIterator > | |
| void | deserialize_iterator (ArcType &a, OutputIterator result) |
| template<typename T > | |
| oarchive & | operator<< (oarchive &a, const T &i) |
| template<typename T > | |
| oarchive_soft_fail & | operator<< (oarchive_soft_fail &a, const T &i) |
| oarchive & | serialize (oarchive &a, const void *i, const size_t length) |
| oarchive_soft_fail & | serialize (oarchive_soft_fail &a, const void *i, const size_t length) |
| template<typename T > | |
| iarchive & | operator>> (iarchive &a, __podify__< T > i) |
| template<typename T , void(*)(T &, const any &) applyfn> | |
| void | apply_adapter (any &d, const any ¶m) |
| __any_registration_map_type & | __get_registration_map () |
| template<typename Target , typename Source > | |
| boost::disable_if_c < boost::is_convertible < Source, Target >::value, Target >::type | robust_cast (const Source &h) |
| template<typename Key , typename T , typename H , typename L , typename E > | |
| std::vector< Key > | keys_as_vector (const judy_map_m< Key, T, H, L, E > &map) |
| template<typename Key , typename T , typename H , typename L , typename E > | |
| const T & | safe_get (const judy_map_m< Key, T, H, L, E > &map, Key k) |
| template<typename Key , typename T > | |
| std::vector< Key > | keys_as_vector (const judy_map_kdcell< Key, T > &map) |
| template<typename Key , typename T > | |
| const T | safe_get (const judy_map_kdcell< Key, T > &map, Key k) |
| gl_uint128_t | MD5 (std::string str) |
| uint32_t | get_local_ip () |
| std::string | get_local_ip_as_str () |
| std::pair< size_t, int > | get_free_tcp_port () |
| template<typename T > | |
| std::set< T > | set_union (const std::set< T > &a, const std::set< T > &b) |
| template<typename T > | |
| std::set< T > | set_union (const std::set< T > &a, const T &b) |
| template<typename T > | |
| std::set< T > | set_intersect (const std::set< T > &a, const std::set< T > &b) |
| template<typename T > | |
| std::set< T > | set_difference (const std::set< T > &a, const std::set< T > &b) |
| template<typename T > | |
| std::set< T > | set_difference (const std::set< T > &a, const T &b) |
| template<typename T > | |
| std::pair< std::set< T > , std::set< T > > | set_partition (const std::set< T > &s, const std::set< T > &partition) |
| template<typename T > | |
| bool | set_disjoint (const std::set< T > &a, const std::set< T > &b) |
| template<typename T > | |
| bool | set_equal (const std::set< T > &a, const std::set< T > &b) |
| template<typename T > | |
| bool | includes (const std::set< T > &a, const std::set< T > &b) |
| template<typename T > | |
| bool | is_subset (const std::set< T > &a, const std::set< T > &b) |
| template<typename T > | |
| bool | is_superset (const std::set< T > &a, const std::set< T > &b) |
| template<typename T > | |
| std::ostream & | operator<< (std::ostream &out, const std::set< T > &s) |
| Writes a human representation of the set to the supplied stream. | |
| template<typename Key , typename T > | |
| const T & | safe_get (const std::map< Key, T > &map, const Key &key) |
| template<typename Key , typename T > | |
| const T | safe_get (const std::map< Key, T > &map, const Key &key, const T default_value) |
| template<typename OldKey , typename NewKey , typename T > | |
| std::map< NewKey, T > | rekey (const std::map< OldKey, T > &map, const std::map< OldKey, NewKey > &key_map) |
| template<typename Key , typename OldT , typename NewT > | |
| std::map< Key, NewT > | remap (const std::map< Key, OldT > &map, const std::map< OldT, NewT > &val_map) |
| template<typename Key , typename T > | |
| void | remap (std::map< Key, T > &map, const std::map< T, T > &val_map) |
| template<typename Key , typename T > | |
| std::map< Key, T > | map_union (const std::map< Key, T > &a, const std::map< Key, T > &b) |
| template<typename Key , typename T > | |
| std::map< Key, T > | map_intersect (const std::map< Key, T > &a, const std::map< Key, T > &b) |
| template<typename Key , typename T > | |
| std::map< Key, T > | map_intersect (const std::map< Key, T > &m, const std::set< Key > &keys) |
| template<typename Key , typename T > | |
| std::map< Key, T > | map_difference (const std::map< Key, T > &a, const std::map< Key, T > &b) |
| template<typename Key , typename T > | |
| std::set< Key > | keys (const std::map< Key, T > &map) |
| template<typename Key , typename T > | |
| std::vector< Key > | keys_as_vector (const std::map< Key, T > &map) |
| template<typename Key , typename T > | |
| std::set< T > | values (const std::map< Key, T > &map) |
| template<typename Key , typename T > | |
| std::vector< T > | values (const std::map< Key, T > &m, const std::set< Key > &keys) |
| template<typename Key , typename T > | |
| std::vector< T > | values (const std::map< Key, T > &m, const std::vector< Key > &keys) |
| template<typename Key > | |
| std::map< Key, Key > | make_identity_map (const std::set< Key > &keys) |
| Creates an identity map (a map from elements to themselves). | |
| template<typename Key , typename T > | |
| std::ostream & | operator<< (std::ostream &out, const std::map< Key, T > &m) |
| Writes a map to the supplied stream. | |
| std::string | trim (const std::string &str) |
| template<typename T > | |
| std::string | tostr (const T &t) |
| template<typename T > | |
| T | fromstr (const std::string &str) |
| std::string | pad_number (const size_t number, const size_t npad, const char pad_value= '0') |
| std::vector< std::string > | strsplit (const std::string &str, const std::string &splitchars, const bool auto_trim=false) |
| float | lowres_time_seconds () |
| size_t | lowres_time_millis () |
| void | my_sleep (size_t sleeplen) |
| gl_uint128_t | fill_128b () |
| std::ostream & | operator<< (std::ostream &out, const gl_uint128_t &val) |
Variables | |
| class graphlab::distributed_core | __attribute__ |
| A GraphLab core is the base (or core) data structure in GraphLab. | |
| const unsigned char | STANDARD_CALL = 1 |
| const unsigned char | FAST_CALL = 2 |
| const unsigned char | WAIT_FOR_REPLY = 4 |
| const unsigned char | BARRIER = 8 |
| const unsigned char | CONTROL_PACKET = 16 |
| const unsigned char | REPLY_PACKET = 32 |
The namespace containing all graphlab objects and functions.
All objects and functions used in graphlab are contained within the graphlab namespace. Forexample to access the graph type a user must therefore either include the graphlab namespace or use:
graphlab::graph<VertexType, EdgeType>
Because most of the graphlab types depend on the graph type we have created a templated struct called graphlab::types.
This file contains the definitions of some of the basic factor types needed for loopy belief propagation. This is demo code and is intentionally kept as simple as possible.
This file contains the definitions of a simple discrete variable.
Simple metrics reporter that dumps metrics to standard output.
Simple metrics reporter that dumps metrics to a file.
Simple metrics reporter that dumps metrics to HTML
task set that only keeps record of whether function was scheduled for given vertex.
Detects if a class has a load function implemented
Detects if a class has a save function implemented
All objects and functions used in graphlab are contained within the graphlab namespace. Forexample to access the graph type a user must therefore either include the graphlab namespace or use:
graphlab::graph<VertexType, EdgeType>
Because most of the graphlab types depend on the graph type we have created a templated struct called graphlab::types.
the reasons for execution completion.
Because there are several reasons why the graphlab engine might terminate the exec_status value is returned from the start function after completing execution.
Definition at line 45 of file iengine.hpp.
| void graphlab::apply_adapter | ( | any & | d, | |
| const any & | param | |||
| ) |
Because it is inconvenient that the apply function specification takes the current value as an "any" as opposed to using the true type of the current value (T), this function adapts an apply function written in the more intuitive form:
void applyfn(T&, const any&)
to the regular apply function type. apply_adapter<T, applyfn> is a function which matches the regular apply function type and calls applyfn.
Definition at line 281 of file glshared.hpp.
| iarchive_soft_fail& graphlab::deserialize | ( | iarchive_soft_fail & | a, | |
| void *const | i, | |||
| const size_t | length | |||
| ) | [inline] |
deserializes an arbitrary pointer + length from an archive
Definition at line 152 of file iarchive.hpp.
| iarchive& graphlab::deserialize | ( | iarchive & | a, | |
| void *const | i, | |||
| const size_t | length | |||
| ) | [inline] |
deserializes an arbitrary pointer + length from an archive
Definition at line 135 of file iarchive.hpp.
| void graphlab::deserialize_iterator | ( | ArcType & | a, | |
| OutputIterator | result | |||
| ) |
The accompanying function to serialize_iterator() Reads elements from the stream and send it to the output iterator. Note that this requires an additional template parameter T which is the "type of object to deserialize" This is necessary for instance for the map type. The map<T,U>::value_type is pair<const T,U> which is not useful since I cannot assign to it. In this case, T=pair<T,U>
Returns true on success, false on failure
Definition at line 77 of file iterator.hpp.
| gl_uint128_t graphlab::fill_128b | ( | ) | [inline] |
Sets all 128bits of the the gl_uint128_t to 'true'. Or the 128-bit integer representation of "-1"
Definition at line 55 of file uint128.hpp.
| T graphlab::fromstr | ( | const std::string & | str | ) |
Convenience function for using std streams to convert a string to anything
Definition at line 400 of file stl_util.hpp.
| void graphlab::graph_partition_to_atomindex | ( | graph< VertexData, EdgeData > & | g, | |
| std::vector< vertex_id_t > & | parts, | |||
| std::string | basename | |||
| ) |
Quick utility function to quickly turn a graph into a disk graph parts is a vector assigning each vertex to an atom ID. atom IDs begin at 0. The total number of atoms created is 1 + the largest value in the parts vector.
The result graph will be saved using the basename provided. The atom index will have file name "[basename].idx" and the atoms will be stored in "[basename].0", "[basename].1", etc.
Definition at line 642 of file disk_graph.hpp.
| bool graphlab::is_subset | ( | const std::set< T > & | a, | |
| const std::set< T > & | b | |||
| ) |
Returns true if $a b$
Definition at line 135 of file stl_util.hpp.
| std::set<Key> graphlab::keys | ( | const std::map< Key, T > & | map | ) |
Returns the set of keys in a map
Definition at line 296 of file stl_util.hpp.
| std::vector<Key> graphlab::keys_as_vector | ( | const std::map< Key, T > & | map | ) |
Get teh set of keys in a map as a vector
Definition at line 309 of file stl_util.hpp.
| std::vector<Key> graphlab::keys_as_vector | ( | const judy_map_m< Key, T, H, L, E > & | map | ) |
Get the set of keys in a map as a vector
Definition at line 31 of file judy_util.hpp.
| size_t graphlab::lowres_time_millis | ( | ) |
Returns the number of milliseconds time since program start. This value is only updated once every 100ms.
| float graphlab::lowres_time_seconds | ( | ) |
Returns the time since program start. This value is only updated once every 100ms.
| std::map<Key, T> graphlab::map_difference | ( | const std::map< Key, T > & | a, | |
| const std::map< Key, T > & | b | |||
| ) |
Computes the difference between two maps
Definition at line 279 of file stl_util.hpp.
| std::map<Key, T> graphlab::map_intersect | ( | const std::map< Key, T > & | a, | |
| const std::map< Key, T > & | b | |||
| ) |
Computes the intersection of two maps
Definition at line 246 of file stl_util.hpp.
| std::map<Key, T> graphlab::map_intersect | ( | const std::map< Key, T > & | m, | |
| const std::set< Key > & | keys | |||
| ) |
Returns the entries of a map whose keys show up in the set keys
Definition at line 263 of file stl_util.hpp.
| std::map<Key, T> graphlab::map_union | ( | const std::map< Key, T > & | a, | |
| const std::map< Key, T > & | b | |||
| ) |
Computes the union of two maps
Definition at line 230 of file stl_util.hpp.
| gl_uint128_t graphlab::MD5 | ( | std::string | str | ) |
Computes the MD5 hash of a string
| void graphlab::mr_disk_graph_construction | ( | distributed_control & | dc, | |
| GraphConstructor & | gc, | |||
| size_t | max_per_node, | |||
| std::string | outputbasename, | |||
| size_t | numatoms | |||
| ) |
| GraphConstructor | A subclass of igraph_constructor. |
Each process must construct a single instance of the graph constructor. This constructor is then replicated 'max_per_node' times on each machine using the GraphConstructor's copy constructor. In total, max = max_per_node * dc.numprocs() instances are constructed. begin() on each instance is called using this value.
This function must be called with the same arguments across all the machines.
The constraint is that every edge and every vertex must be added at most once across all (distributed) GraphConstructors. Arbitrary joining may result if the same edge/vertex is added more than once.
| dc | The distributed control object | |
| gc | An instance of the GraphConstructor. Must be copy constructable | |
| max_per_node | Number of times 'gc' will be replicated on each machine | |
| outputbasename | The output atom files will be stored as outputbasename.0 outputbasename.1, etc. With atom index in outputbasename.idx In addition, a series of temporary files named [outputbasename]_t... will be created. They will be erased at the end of the execution of mr_disk_graph_construction. | |
| numatoms | The number of atoms to create. |
Definition at line 164 of file mr_disk_graph_construction.hpp.
| void graphlab::my_sleep | ( | size_t | sleeplen | ) |
Sleeps for sleeplen seconds
| oarchive& graphlab::operator<< | ( | oarchive & | a, | |
| const T & | i | |||
| ) |
Allows Use of the "stream" syntax for serialization
Definition at line 126 of file oarchive.hpp.
| std::ostream& graphlab::operator<< | ( | std::ostream & | out, | |
| const gl_uint128_t & | val | |||
| ) | [inline] |
Prints the 128-bit integer as hexadecimal
Definition at line 65 of file uint128.hpp.
| iarchive& graphlab::operator>> | ( | iarchive & | a, | |
| T & | i | |||
| ) |
Allows Use of the "stream" syntax for serialization
Definition at line 115 of file iarchive.hpp.
| iarchive_soft_fail& graphlab::operator>> | ( | iarchive_soft_fail & | a, | |
| T & | i | |||
| ) |
Allows Use of the "stream" syntax for serialization
Definition at line 126 of file iarchive.hpp.
| std::string graphlab::pad_number | ( | const size_t | number, | |
| const size_t | npad, | |||
| const char | pad_value = '0' | |||
| ) | [inline] |
Returns a string representation of the number, padded to 'npad' characters using the pad_value character
Definition at line 412 of file stl_util.hpp.
| std::map<NewKey, T> graphlab::rekey | ( | const std::map< OldKey, T > & | map, | |
| const std::map< OldKey, NewKey > & | key_map | |||
| ) |
Transform each key in the map using the key_map transformation. The resulting map will have the form output[key_map[i]] = map[i]
Definition at line 186 of file stl_util.hpp.
| void graphlab::remap | ( | std::map< Key, T > & | map, | |
| const std::map< T, T > & | val_map | |||
| ) |
Inplace version of remap
Definition at line 217 of file stl_util.hpp.
| std::map<Key, NewT> graphlab::remap | ( | const std::map< Key, OldT > & | map, | |
| const std::map< OldT, NewT > & | val_map | |||
| ) |
Transform each key in the map using the key_map transformation. The resulting map will have the form output[i] = remap[map[i]]
Definition at line 203 of file stl_util.hpp.
| boost::enable_if_c< boost::is_convertible< Source, Target >::value, Target >::type graphlab::robust_cast | ( | const Source & | h | ) |
robust_cast performs a static cast from type A to type B if a cast can be done. Return B() otherwise
Definition at line 37 of file robust_cast.hpp.
| const T& graphlab::safe_get | ( | const std::map< Key, T > & | map, | |
| const Key & | key | |||
| ) |
constant lookup in a map. assertion failure of key not found in map
Definition at line 157 of file stl_util.hpp.
| const T graphlab::safe_get | ( | const std::map< Key, T > & | map, | |
| const Key & | key, | |||
| const T | default_value | |||
| ) |
constant lookup in a map. If key is not found in map, 'default_value' is returned. Note that this can't return a reference and must return a copy
Definition at line 171 of file stl_util.hpp.
| oarchive& graphlab::serialize | ( | oarchive & | a, | |
| const void * | i, | |||
| const size_t | length | |||
| ) | [inline] |
Serializes an arbitrary pointer + length to an archive
Definition at line 141 of file oarchive.hpp.
| oarchive_soft_fail& graphlab::serialize | ( | oarchive_soft_fail & | a, | |
| const void * | i, | |||
| const size_t | length | |||
| ) | [inline] |
Serializes an arbitrary pointer + length to an archive
Definition at line 153 of file oarchive.hpp.
| void graphlab::serialize_iterator | ( | ArcType & | a, | |
| InputIterator | begin, | |||
| InputIterator | end, | |||
| size_t | vsize | |||
| ) |
Serializes the contents between the iterators begin and end. This version takes all InputIterator types, but takes a "count" for efficiency. This count is checked and will return failure if the number of elements serialized does not match the count Returns true on success, false on failure
Definition at line 53 of file iterator.hpp.
| void graphlab::serialize_iterator | ( | ArcType & | a, | |
| RandomAccessIterator | begin, | |||
| RandomAccessIterator | end | |||
| ) |
Serializes the contents between the iterators begin and end. This version prefers the availability of RandomAccessIterator since it needs a distance between the begin and end iterator. This function as implemented will work for other input iterators but is extremely inefficient. Returns true on success, false on failure
Definition at line 35 of file iterator.hpp.
| std::pair<std::set<T>,std::set<T> > graphlab::set_partition | ( | const std::set< T > & | s, | |
| const std::set< T > & | partition | |||
| ) |
Definition at line 108 of file stl_util.hpp.
| std::set<T> graphlab::set_union | ( | const std::set< T > & | a, | |
| const std::set< T > & | b | |||
| ) |
computes the union of two sets.
Definition at line 64 of file stl_util.hpp.
| std::vector<std::string> graphlab::strsplit | ( | const std::string & | str, | |
| const std::string & | splitchars, | |||
| const bool | auto_trim = false | |||
| ) | [inline] |
Using splitchars as delimiters, splits the string into a vector of strings. if auto_trim is true, trim() is called on all the extracted strings before returning.
Definition at line 436 of file stl_util.hpp.
| std::string graphlab::tostr | ( | const T & | t | ) |
Convenience function for using std streams to convert anything to a string
Definition at line 390 of file stl_util.hpp.
| std::string graphlab::trim | ( | const std::string & | str | ) | [inline] |
Removes white space (space and tabs) from the beginning and end of str, returning the resultant string
Definition at line 379 of file stl_util.hpp.
| std::set<T> graphlab::values | ( | const std::map< Key, T > & | map | ) |
Gets the values from a map
Definition at line 324 of file stl_util.hpp.
A GraphLab core is the base (or core) data structure in GraphLab.
This is like graphlab::core but for the distributed setting.
The core is templatized over the VertexType and EdgeType however by using the ref types typedef, one can simply create a core by doing the following:
gl::distributed_core glcore;
The core contains the
The core also manages the engine and scheduler construction parameters.
The distributed core is more limited as compared to the shared memory graphlab::core version. In particular, engine construction must be executed manually through build_engine() and the engine options / scheduler options cannot be modified after engine construction.
Also, some functions must be called by all machines simultaneously, while others are "parallel" allowing any machine to call the function seperately. This behavior is documented in each function. The user must take care to obey this requirement or it may result in unexpected behavior.
1.7.1