Buffers all modifications to the properties until the user triggers the commit.
More...
#include <ibm_multiproperty_graph.hpp>
|
typedef IdType | elementd_type |
|
typedef GraphElement::property_type | property_type |
|
typedef std::string | property_name_type |
|
typedef std::string | property_value_type |
|
typedef std::string | label_string_type |
|
typedef std::string | vclass_string_type |
|
|
size_t | _get_or_allocate_propertyid (const property_name_type &pname) |
|
size_t | _get_propertyid (const property_name_type &pname) |
|
|
bool | _isEdge |
|
long | vid_source |
|
int | boolEndIterSet |
|
base_type | _iterEnd |
|
|
typedef BaseIterator | base_type |
|
typedef Graph | graph_type |
|
template<class GraphElement, class BaseIterator, class Graph, class IdType>
class ibmppl::imp_graphelement_iterator< GraphElement, BaseIterator, Graph, IdType >
Buffers all modifications to the properties until the user triggers the commit.
Multiproperty graph base iterator; Vertex and edge iterators derive from it. Pred iterator does not.
template<class GraphElement, class BaseIterator, class Graph, class IdType>
Call this method with the pertinent file name and line number of the calling code. This method will do a trivial consistency check on this iterator. If the test fails, CHKCONSIST_ASSERT4 will take action. See checkconsistency.h.
- Author
- ccjason (3/4/2014)
template<class GraphElement, class BaseIterator, class Graph, class IdType>
Delete the specified sub-property from this graph element
Note: the propid version of this method is somewhat faster.
- Author
- ccjason (1/6/2014)
template<class GraphElement, class BaseIterator, class Graph, class IdType>
Delete the specified sub-property from this graph element
- Author
- ccjason (1/6/2014)
template<class GraphElement, class BaseIterator, class Graph, class IdType>
Get the specified property value as a double value.
To-do: document what happens if the property is not set or is not of the specified type.
- Author
- ccjason (1/6/2014)
- Returns
- double
template<class GraphElement, class BaseIterator, class Graph, class IdType>
Get the external id of a given vertex.
See the set_externalid() method for more information about external id's.
- Author
- ccjason (1/6/2014)
- Returns
- std::string
template<class GraphElement, class BaseIterator, class Graph, class IdType>
Method to implement the first step in implementing a property iterator on a given vertex.
Also see get_next_subproperty_id() method.
- Author
- ccjason (1/6/2014)
- Returns
- size_t the first property-id set on a given graph element.
template<class GraphElement, class BaseIterator, class Graph, class IdType>
Get the specified property value as an int value.
To-do: document what happens if the property is not set or is not of the specified type.
- Author
- ccjason (1/6/2014)
- Returns
- int
template<class GraphElement, class BaseIterator, class Graph, class IdType>
Returns the label of an edge.
See the set_label() method for information about labels.
- Exceptions
-
(int)505 | - if the iterator is not for an edge; |
(int)506 | - the label is not set |
- Author
- ccjason (1/6/2014)
- Returns
- std::string
template<class GraphElement, class BaseIterator, class Graph, class IdType>
Returns the labelid of an edge.
See the set_label() method for information about labels.
- Exceptions
-
(int)505 | - if the iterator is not for an edge; |
- Author
- ccjason (1/10/2014)
- Returns
- img_label_type
template<class GraphElement, class BaseIterator, class Graph, class IdType>
Method to implement a property iterator on a given vertex.
- Parameters
-
- Author
- ccjason (1/6/2014)
- Returns
- size_t
template<class GraphElement, class BaseIterator, class Graph, class IdType>
returns the specified property value as a string.
Note: other methods are likely to be somewhat faster because property-id's are faster than property names and eventually value-type specific methods can be expected to be faster than generic string methods.
- Author
- ccjason (1/6/2014)
- Returns
- property_value_type
template<class GraphElement, class BaseIterator, class Graph, class IdType>
Get the specified property value as a string.
To-do: document what happens if the property is not set.
To-do: document what happens if the property is not of the specified type. (I think it actually "converts" to the specified type in this case. If so, in the future there might be a performance penalty for that.)
- Author
- ccjason (1/6/2014)
- Returns
- int
template<class GraphElement, class BaseIterator, class Graph, class IdType>
- Author
- ccjason (1/6/2014)
- Returns
- size_t The number of sub-properties on this graph element
template<class GraphElement, class BaseIterator, class Graph, class IdType>
Returns the value type of the given property on the given element.
Right now there are several property value types supported (string, int, double, unset). This method allows the caller to know what type value to expect before making a call to extract that value. In doing so, it also lets the caller know which method is best for extracting that value.
- Author
- ccjason (1/6/2014)
- Returns
- int
template<class GraphElement, class BaseIterator, class Graph, class IdType>
This method returns the internal id of the element currently referenced by this iterator. The type of returned value (elementd_type) is usually a 64bit integer.
- Author
- ccjason (3/4/2014)
- Returns
- const elementd_type
template<class GraphElement, class BaseIterator, class Graph, class IdType>
This method advances the iterator.
- Author
- ccjason (3/4/2014)
template<class GraphElement, class BaseIterator, class Graph, class IdType>
advance the iterator
- Author
- ccjason (3/4/2014)
template<class GraphElement, class BaseIterator, class Graph, class IdType>
equals operator.
- Author
- ccjason (3/4/2014)
- Returns
- bool
template<class GraphElement, class BaseIterator, class Graph, class IdType>
This method is implemented in the superclass but is deprecated for objects of this class.
- Author
- ccjason (3/4/2014)
- Returns
- bool
template<class GraphElement, class BaseIterator, class Graph, class IdType>
Set the external vertex id
External id's are unique values that the application sets on a given graph element that are meaningful to the application. Ex. "George Washington" or "IBM". We don't enforce this yet, but it expected that only one element will have a given external id value.
Note: 2013-01-06: it is likely that in a future implementation of this graph we'll automatically build an index for vertex external id's. That index is likely to support only unique mappings from externalid -> vertex.
FIXME: It should be set in the constructor;
template<class GraphElement, class BaseIterator, class Graph, class IdType>
set the label of an edge
Labels are strings that designate the purpose of an edge. An example of this concept is the "likes" or "member_of" label.
One should set the label of and edge only once. We'll eventually enforce that rule.
FIXME: It should be set in the constructor;
Note: the labelid method is faster than this one. Use it if you can.
- Exceptions
-
- Author
- ccjason (1/10/2014)
template<class GraphElement, class BaseIterator, class Graph, class IdType>
set the labelid of an edge
Labels are strings that designate the purpose of an edge. An example of this concept is the "likes" or "member_of" label. The labelid is a shorter key that more compactly represents a label string.
FIXME: It should be set in the constructor;
- Exceptions
-
- Author
- ccjason (1/10/2014)
template<class GraphElement, class BaseIterator, class Graph, class IdType>
This method is implemented in the super class but deprecated in this class.
- Author
- ccjason (3/4/2014)
- Returns
- const elementd_type
template<class GraphElement, class BaseIterator, class Graph, class IdType>
This method takes the name of a property and a new (string) value and updates the referenced element.
- Author
- ccjason (3/4/2014)
template<class GraphElement, class BaseIterator, class Graph, class IdType>
This method sets the value of the specified property on the referenced element.
- Parameters
-
- Author
- ccjason (3/4/2014)
template<class GraphElement, class BaseIterator, class Graph, class IdType>
Same as the version of this method that takes a std::string. In fact currently this method calls that method. This one exists to be a place holder for a faster implementation we might write in the future that strives to reduce the use of std::string which appears to be responsible for most of the the CPU time spent in and below these set of methods. – If a caller doesn't currently have a std::string, they should call this method instead. This should also be the case if the caller is constructing a std::string simply for the sake of calling the existing method. Otherwise, if the caller does have a std::string value, it should call the other method.
- Author
- ccjason (9/15/2014)
template<class GraphElement, class BaseIterator, class Graph, class IdType>
template<class GraphElement, class BaseIterator, class Graph, class IdType>
The documentation for this class was generated from the following file:
- /home/yxia/Work/ibmppl.gsa/datastructure/graph/ibm_multiproperty_graph.hpp