Sparksee
6.0.2
|
Public Member Functions | |
virtual | ~Graph () |
Destructor. | |
type_t | NewNodeType (const std::wstring &name) |
Creates a new node type. More... | |
oid_t | NewNode (type_t type) |
Creates a new node instance. More... | |
type_t | NewEdgeType (const std::wstring &name, bool_t directed, bool_t neighbors) |
Creates a new edge type. More... | |
type_t | NewRestrictedEdgeType (const std::wstring &name, type_t tail, type_t head, bool_t neighbors) |
Creates a new restricted edge type. More... | |
void | IndexNeighbors (type_t edgeType, bool_t neighbors) |
Creates or destroys the neighbors index of an edge type. More... | |
oid_t | NewEdge (type_t type, oid_t tail, oid_t head) |
Creates a new edge instance. More... | |
oid_t | NewEdge (type_t type, attr_t tailAttr, Value &tailV, attr_t headAttr, Value &headV) |
Creates a new edge instance. More... | |
int64_t | CountNodes () |
Gets the number of nodes. More... | |
int64_t | CountEdges () |
Gets the number of edges. More... | |
EdgeData * | GetEdgeData (oid_t edge) |
Gets information about an edge. More... | |
oid_t | GetEdgePeer (oid_t edge, oid_t node) |
Gets the other end for the given edge. More... | |
void | Drop (oid_t oid) |
Drops the given OID. More... | |
void | Drop (Objects *objs) |
Drops all the OIDs from the given collection. More... | |
type_t | GetObjectType (oid_t oid) |
Gets the Sparksee node or edge type identifier for the given OID. More... | |
attr_t | NewAttribute (type_t type, const std::wstring &name, DataType dt, AttributeKind kind) |
Creates a new attribute. More... | |
attr_t | NewAttribute (type_t type, const std::wstring &name, DataType dt, AttributeKind kind, Value &defaultValue) |
Creates a new attribute with a default value. More... | |
attr_t | NewSessionAttribute (type_t type, DataType dt, AttributeKind kind) |
Creates a new Session attribute. More... | |
attr_t | NewSessionAttribute (type_t type, DataType dt, AttributeKind kind, Value &defaultValue) |
Creates a new Session attribute with a default value. More... | |
attr_t | NewArrayAttribute (type_t type, const std::wstring &name, DataType dt, int32_t size) |
Creates a new array attribute. More... | |
attr_t | NewSessionArrayAttribute (type_t type, DataType dt, int32_t size) |
Creates a new Session array attribute. More... | |
void | SetAttributeDefaultValue (attr_t attr, Value &value) |
Sets a default value for an attribute. More... | |
void | IndexAttribute (attr_t attr, AttributeKind kind) |
Updates the index of the given attribute. More... | |
void | GetAttribute (oid_t oid, attr_t attr, Value &value) |
Gets the Value for the given attribute and OID. More... | |
Value * | GetAttribute (oid_t oid, attr_t attr) |
Gets the Value for the given attribute and OID. More... | |
TextStream * | GetAttributeText (oid_t oid, attr_t attr) |
Gets the read-only TextStream for the given text attribute and OID. More... | |
void | SetAttributeText (oid_t oid, attr_t attr, TextStream *tstream) |
Sets the writable TextStream for the given text attribute and OID. More... | |
ValueArray * | GetArrayAttribute (oid_t oid, attr_t attr) |
Gets the ValueArray for the given array attribute and OID or NULL if it does not exist. More... | |
ValueArray * | SetArrayAttribute (oid_t oid, attr_t attr, const Value &value) |
Sets all the elements of the ValueArray for the given array attribute and OID and returns it. More... | |
void | SetArrayAttributeVoid (oid_t oid, attr_t attr, const Value &value) |
Sets all the elements of the ValueArray for the given array attribute and OID. More... | |
void | SetArrayAttribute (attr_t attr, const Value &value) |
Sets all the values of the array of the given array attribute for all the objects of the types the attribute applies to. More... | |
void | SetAttribute (oid_t oid, attr_t attr, Value &value) |
Sets the Value for the given attribute and OID. More... | |
AttributeStatistics * | GetAttributeStatistics (attr_t attr, bool_t basic) |
Gets statistics from the given attribute. More... | |
int64_t | GetAttributeIntervalCount (attr_t attr, Value &lower, bool_t includeLower, Value &higher, bool_t includeHigher) |
Gets how many objects have a value into the given range for the given attribute. More... | |
void | SetAttribute (attr_t attr, Value &value) |
Sets the value of the given attribute for all the objects of the types the attribute applies to. More... | |
type_t | FindType (const std::wstring &name) |
Gets the Sparksee type identifier for the given type name. More... | |
Type * | GetType (type_t type) |
Gets information about the given type. More... | |
void | RemoveType (type_t type) |
Removes the given type. More... | |
void | RenameType (const std::wstring &oldName, const std::wstring &newName) |
Renames a type. More... | |
void | RenameType (type_t type, const std::wstring &newName) |
Renames a type. More... | |
attr_t | FindAttribute (type_t type, const std::wstring &name) |
Gets the Sparksee attribute identifier for the given type identifier and attribute name. More... | |
Attribute * | GetAttribute (attr_t attr) |
Gets information about the given attribute. More... | |
void | RemoveAttribute (attr_t attr) |
Removes the given attribute. More... | |
void | RenameAttribute (attr_t attr, const std::wstring &newName) |
Renames an attribute. More... | |
oid_t | FindObject (attr_t attr, Value &value) |
Finds one object having the given Value for the given attribute. More... | |
oid_t | FindOrCreateObject (attr_t attr, Value &value) |
Finds one object having the given Value for the attribute or it creates one does not exist any. More... | |
Objects * | Select (type_t type) |
Selects all OIDs belonging to the given type. More... | |
Objects * | Select (attr_t attr, Condition cond, const Value &value) |
Selects all OIDs satisfying the given condition for the given attribute. More... | |
Objects * | Select (attr_t attr, Condition cond, const Value &lower, const Value &higher) |
Selects all OIDs satisfying the given condition for the given attribute. More... | |
Objects * | Select (attr_t attr, Condition cond, const Value &value, const Objects *restriction) |
Selects all OIDs satisfying the given condition for the given attribute. More... | |
Objects * | Select (attr_t attr, Condition cond, const Value &lower, const Value &higher, const Objects *restriction) |
Selects all OIDs satisfying the given condition for the given attribute. More... | |
KeyValues * | TopK (attr_t attribute, Order order, int32_t k) |
Gets a KeyValues iterator as a result of the TopK operation. More... | |
KeyValues * | TopK (attr_t attribute, Condition operation, const Value &lower, Order order, int32_t k) |
Gets a KeyValues iterator as a result of the TopK operation. More... | |
KeyValues * | TopK (attr_t attribute, Condition operation, const Value &lower, const Value &higher, Order order, int32_t k) |
Gets a KeyValues iterator as a result of the TopK operation. More... | |
KeyValues * | TopK (attr_t attribute, Order order, int32_t k, Objects *restriction) |
Gets a KeyValues iterator as a result of the TopK operation. More... | |
KeyValues * | TopK (attr_t attribute, Condition operation, const Value &lower, Order order, int32_t k, Objects *restriction) |
Gets a KeyValues iterator as a result of the TopK operation. More... | |
KeyValues * | TopK (attr_t attribute, Condition operation, const Value &lower, const Value &higher, Order order, int32_t k, Objects *restriction) |
Gets a KeyValues iterator as a result of the TopK operation. More... | |
Objects * | Explode (oid_t oid, type_t etype, EdgesDirection dir) |
Selects all edges from or to the given node OID and for the given edge type. More... | |
Objects * | Explode (Objects *objs, type_t etype, EdgesDirection dir) |
Selects all edges from or to each of the node OID in the given collection and for the given edge type. More... | |
int64_t | Degree (oid_t oid, type_t etype, EdgesDirection dir) |
Gets the number of edges from or to the given node OID and for the given edge type. More... | |
Objects * | Neighbors (oid_t oid, type_t etype, EdgesDirection dir) |
Selects all neighbor nodes from or to the given node OID and for the given edge type. More... | |
Objects * | Neighbors (Objects *objs, type_t etype, EdgesDirection dir) |
Selects all neighbor nodes from or to each of the node OID in the given collection and for the given edge type. More... | |
Objects * | Edges (type_t etype, oid_t tail, oid_t head) |
Gets all the edges of the given type between two given nodes (tail and head). More... | |
oid_t | FindEdge (type_t etype, oid_t tail, oid_t head) |
Gets any of the edges of the given type between two given nodes (tail and head). More... | |
oid_t | FindOrCreateEdge (type_t etype, oid_t tail, oid_t head) |
Gets any of the edges of the specified type between two given nodes (tail and head). More... | |
Objects * | Tails (Objects *edges) |
Gets all the tails from the given edges collection. More... | |
Objects * | Heads (Objects *edges) |
Gets all the heads from the given edges collection. More... | |
void | TailsAndHeads (Objects *edges, Objects *tails, Objects *heads) |
Gets all the tails and heads from the given edges collection. More... | |
TypeList * | FindNodeTypes () |
Gets all existing Sparksee node type identifiers. More... | |
TypeList * | FindEdgeTypes () |
Gets all existing Sparksee edge type identifiers. More... | |
TypeList * | FindTypes () |
Gets all existing Sparksee node and edge type identifiers. More... | |
AttributeList * | FindAttributes (type_t type) |
Gets all existing Sparksee attribute identifiers for the given type identifier. More... | |
AttributeList * | GetAttributes (oid_t oid) |
Gets all Sparksee attribute identifiers with a non-NULL value for the given Sparksee OID. More... | |
Values * | GetValues (attr_t attr) |
Gets the Value collection for the given attribute. More... | |
void | DumpData (const std::wstring &file) throw (sparksee::gdb::FileNotFoundException, sparksee::gdb::Error) |
Dumps logical data to a file. More... | |
void | DumpStorage (const std::wstring &file) throw (sparksee::gdb::FileNotFoundException, sparksee::gdb::Error) |
Dumps internal storage data to a file. More... | |
void | Export (const std::wstring &file, ExportType type, ExportManager *em) throw (sparksee::gdb::IOException) |
Exports the Graph. More... | |
void | Backup (const std::wstring &file) throw (sparksee::gdb::FileNotFoundException, sparksee::gdb::Error) |
Dumps all the data to a backup file. More... | |
void | EncryptedBackup (const std::wstring &file, const std::wstring &keyInHex, const std::wstring &ivInHex) throw (sparksee::gdb::FileNotFoundException, sparksee::gdb::Error) |
Dumps all the data to a backup file. More... | |
Private Member Functions | |
sparksee_core::DbGraph * | GetHandler () |
Gets the handled reference. More... | |
const sparksee_core::DbGraph * | GetHandler () const |
Gets the handled reference. More... | |
void | SetHandler (sparksee_core::DbGraph *h) |
Sets the handled reference. More... | |
void | FreeHandler () |
Frees (deletes) the handled reference. | |
bool_t | IsNull () const |
Gets if the handler is NULL. More... | |
Friends | |
class | Session |
class | Values |
class | ValuesIterator |
Graph class.
Each Database has a Graph associated, which is the persistent graph which contains all data stored into the graph database and is retrieved from a Session.
Check out the 'API' and the 'SPARKSEE graph database' sections in the SPARKSEE User Manual for more details on the use of this class.
void Graph::Backup | ( | const std::wstring & | file | ) | |
throw | ( | sparksee::gdb::FileNotFoundException, | |||
sparksee::gdb::Error | |||||
) |
Dumps all the data to a backup file.
See the Sparksee class Restore methods.
file | [in] Output backup file path. |
FileNotFoundException | If the given file cannot be created. |
int64_t Graph::CountEdges | ( | ) |
Gets the number of edges.
int64_t Graph::CountNodes | ( | ) |
Gets the number of nodes.
int64_t Graph::Degree | ( | oid_t | oid, |
type_t | etype, | ||
EdgesDirection | dir | ||
) |
void Graph::Drop | ( | oid_t | oid | ) |
Drops the given OID.
It also removes its egdges as well as its attribute values.
oid | [in] Sparksee OID to be removed. |
void Graph::Drop | ( | Objects * | objs | ) |
Drops all the OIDs from the given collection.
See Drop method with the single OID parameter. This performs the same operation for each object in the given set.
objs | [in] Objects collection with the OIDs to be removed. |
void Graph::DumpData | ( | const std::wstring & | file | ) | |
throw | ( | sparksee::gdb::FileNotFoundException, | |||
sparksee::gdb::Error | |||||
) |
Dumps logical data to a file.
file | [in] Output file path. |
FileNotFoundException | If the given file cannot be created. |
void Graph::DumpStorage | ( | const std::wstring & | file | ) | |
throw | ( | sparksee::gdb::FileNotFoundException, | |||
sparksee::gdb::Error | |||||
) |
Dumps internal storage data to a file.
file | [in] Output file path. |
FileNotFoundException | If the given file cannot be created. |
void Graph::EncryptedBackup | ( | const std::wstring & | file, |
const std::wstring & | keyInHex, | ||
const std::wstring & | ivInHex | ||
) | |||
throw | ( | sparksee::gdb::FileNotFoundException, | |
sparksee::gdb::Error | |||
) |
Dumps all the data to a backup file.
See the Sparksee class RestoreEncryptedBackup methods.
file | [in] Output backup file path. |
keyInHex | [In] The AES encryption Key as an hexadecimal string (8, 16 or 32 bytes). |
ivInHex | [In] The AES Initialization Vector as an hexadecimal string (16 bytes). |
FileNotFoundException | If the given file cannot be created. |
Objects* Graph::Explode | ( | oid_t | oid, |
type_t | etype, | ||
EdgesDirection | dir | ||
) |
Objects* Graph::Explode | ( | Objects * | objs, |
type_t | etype, | ||
EdgesDirection | dir | ||
) |
void Graph::Export | ( | const std::wstring & | file, |
ExportType | type, | ||
ExportManager * | em | ||
) | |||
throw | ( | sparksee::gdb::IOException | |
) |
Exports the Graph.
file | [in] Output file. |
type | [in] Export type. |
em | [in] Defines how to do the export for each graph object. |
Gets the Sparksee attribute identifier for the given type identifier and attribute name.
type | [in] Sparksee type identifier. |
name | [in] Unique attribute name. |
AttributeList* Graph::FindAttributes | ( | type_t | type | ) |
Gets any of the edges of the given type between two given nodes (tail and head).
If there are more than one, then any of them will be returned. And in case there are no edge between the given tail and head, the Objects InvalidOID will be returned.
etype | [in] Sparksee edge type identifier. |
tail | [in] Tail node identifier. |
head | [in] Head node identifier. |
TypeList* Graph::FindEdgeTypes | ( | ) |
TypeList* Graph::FindNodeTypes | ( | ) |
Gets any of the edges of the specified type between two given nodes (tail and head).
If it can not find any edge of this type between them it tries to create a new one.
etype | [in] Sparksee edge type identifier. |
tail | [in] Tail node identifier. |
head | [in] Head node identifier. |
Finds one object having the given Value for the attribute or it creates one does not exist any.
If the attribute is a node or edge attribute and at least one node/edge with that value is found, it returns one of them. But if it does not exist, then: If it's a node attribute it will create it and set the attribute. If it's an edge attribute it will return the InvalidOID.
Using this method with a global attribute will return the InvalidOID.
type_t Graph::FindType | ( | const std::wstring & | name | ) |
TypeList* Graph::FindTypes | ( | ) |
ValueArray* Graph::GetArrayAttribute | ( | oid_t | oid, |
attr_t | attr | ||
) |
Gets the ValueArray for the given array attribute and OID or NULL if it does not exist.
Gets the Value for the given attribute and OID.
The other version of this call, where the Value is an output parameter instead of the return, is better because it allows the user to reuse an existing Value instance, whereas this call always creates a new Value instance to be returned.
It never returns NULL. Thus, in case the OID has a NULL value for the attribute it returns a NULL Value instance.
int64_t Graph::GetAttributeIntervalCount | ( | attr_t | attr, |
Value & | lower, | ||
bool_t | includeLower, | ||
Value & | higher, | ||
bool_t | includeHigher | ||
) |
Gets how many objects have a value into the given range for the given attribute.
This only works for the attributes with the AttributeKind Indexed or Unique.
Given values must belong to the same DataType than the attribute.
attr | [in] Sparksee attribute identifier. |
lower | [in] Lower bound Value of the range. |
includeLower | [in] If TRUE, include lower bound Value of the range. |
higher | [in] Higher bound Value of the range. |
includeHigher | [in] If TRUE, include higher bound Value of the range. |
AttributeList* Graph::GetAttributes | ( | oid_t | oid | ) |
AttributeStatistics* Graph::GetAttributeStatistics | ( | attr_t | attr, |
bool_t | basic | ||
) |
Gets statistics from the given attribute.
The statistics can only be obtained from Indexed or Unique attributes.
attr | [in] Sparksee attribute identifier. |
basic | [in] If FALSE all statistics are computed, if TRUE just those statistics marked as basic will be computed (see description of the AttributeStatistics class). Of course, computing just basic statistics will be faster than computing all of them. |
TextStream* Graph::GetAttributeText | ( | oid_t | oid, |
attr_t | attr | ||
) |
Gets the read-only TextStream for the given text attribute and OID.
Gets all the heads from the given edges collection.
edges | [in] Sparksee edge identifier collection. |
void Graph::IndexAttribute | ( | attr_t | attr, |
AttributeKind | kind | ||
) |
Creates or destroys the neighbors index of an edge type.
edgeType | [in] Sparksee Edge type identifier. |
neighbors | [in] If TRUE, it indexes the neighbor nodes, otherwise it removes the index. |
Objects* Graph::Neighbors | ( | oid_t | oid, |
type_t | etype, | ||
EdgesDirection | dir | ||
) |
Objects* Graph::Neighbors | ( | Objects * | objs, |
type_t | etype, | ||
EdgesDirection | dir | ||
) |
attr_t Graph::NewAttribute | ( | type_t | type, |
const std::wstring & | name, | ||
DataType | dt, | ||
AttributeKind | kind | ||
) |
attr_t Graph::NewAttribute | ( | type_t | type, |
const std::wstring & | name, | ||
DataType | dt, | ||
AttributeKind | kind, | ||
Value & | defaultValue | ||
) |
Creates a new attribute with a default value.
type | [in] Sparksee node or edge type identifier. |
name | [in] Unique name for the new attribute. |
dt | [in] Data type for the new attribute. |
kind | [in] Attribute kind. |
defaultValue | [in] The default value to use in each new node/edge. |
oid_t Graph::NewEdge | ( | type_t | type, |
attr_t | tailAttr, | ||
Value & | tailV, | ||
attr_t | headAttr, | ||
Value & | headV | ||
) |
Creates a new edge instance.
The tail of the edge will be any node having the given tailV Value for the given tailAttr attribute identifier, and the head of the edge will be any node having the given headV Value for the given headAttr attribute identifier.
type | [in] Sparksee type identifier. |
tailAttr | [in] Sparksee attribute identifier. |
tailV | [in] Value. |
headAttr | [in] Sparksee attribute identifier. |
headV | [in] Value. |
Creates a new edge type.
name | [in] Unique name for the new edge type. |
directed | [in] If TRUE, this creates a directed edge type, otherwise this creates a undirected edge type. |
neighbors | [in] If TRUE, this indexes neighbor nodes, otherwise not. |
Creates a new node instance.
type | [in] Sparksee type identifier. |
type_t Graph::NewNodeType | ( | const std::wstring & | name | ) |
Creates a new node type.
name | [in] Unique name for the new node type. |
Creates a new Session array attribute.
Session attributes are exclusive for the Session (just its Session can use the attribute) and are automatically removed when the Session is closed (thus, attribute data is not persistent into the database).
Since they are not persistent, they cannot be retrieved from the database, so they do not have an identifier name.
type | [in] Sparksee node or edge type identifier. |
dt | [in] Base Data type for the new array attribute elements. |
size | [in] The array size. |
attr_t Graph::NewSessionAttribute | ( | type_t | type, |
DataType | dt, | ||
AttributeKind | kind | ||
) |
Creates a new Session attribute.
Session attributes are exclusive for the Session (just its Session can use the attribute) and are automatically removed when the Session is closed (thus, attribute data is not persistent into the database).
Since they are not persistent, they cannot be retrieved from the database, so they do not have an identifier name.
type | [in] Sparksee node or edge type identifier. |
dt | [in] Data type for the new attribute. |
kind | [in] Attribute kind. |
attr_t Graph::NewSessionAttribute | ( | type_t | type, |
DataType | dt, | ||
AttributeKind | kind, | ||
Value & | defaultValue | ||
) |
Creates a new Session attribute with a default value.
Session attributes are exclusive for the Session (just its Session can use the attribute) and are automatically removed when the Session is closed (thus, attribute data is not persistent into the database).
Since they are not persistent, they cannot be retrieved from the database, so they do not have an identifier name.
type | [in] Sparksee node or edge type identifier. |
dt | [in] Data type for the new attribute. |
kind | [in] Attribute kind. |
defaultValue | [in] The default value to use in each new node/edge. |
void Graph::RemoveAttribute | ( | attr_t | attr | ) |
Removes the given attribute.
attr | [in] Sparksee attribute identifier. |
void Graph::RemoveType | ( | type_t | type | ) |
Removes the given type.
This fails if there exist attributes defined for the type or if there exist restricted edges referencing this type.
type | [in] Sparksee type identifier. |
void Graph::RenameAttribute | ( | attr_t | attr, |
const std::wstring & | newName | ||
) |
Renames an attribute.
The new name must be available.
attr | [in] Sparksee attribute identifier. |
newName | [in] The new name for the attribute. |
void Graph::RenameType | ( | const std::wstring & | oldName, |
const std::wstring & | newName | ||
) |
Renames a type.
The new name must be available.
oldName | [in] The current name of the type to be renamed. |
newName | [in] The new name for the type. |
void Graph::RenameType | ( | type_t | type, |
const std::wstring & | newName | ||
) |
Renames a type.
The new name must be available.
type | [in] The type to be renamed. |
newName | [in] The new name for the type. |
Selects all OIDs satisfying the given condition for the given attribute.
This allows to perform the Between operation, thus it has two Value arguments.
attr | [in] Sparksee attribute identifier. |
cond | [in] Condition to be satisfied. It must be the Between Condition. |
lower | [in] Lower-bound Value to be satisfied. |
higher | [in] Higher-bound Value to be satisfied. |
Objects* Graph::Select | ( | attr_t | attr, |
Condition | cond, | ||
const Value & | lower, | ||
const Value & | higher, | ||
const Objects * | restriction | ||
) |
Selects all OIDs satisfying the given condition for the given attribute.
This allows to perform the Between operation, thus it has two Value arguments.
attr | [in] Sparksee attribute identifier. |
cond | [in] Condition to be satisfied. It must be the Between Condition. |
lower | [in] Lower-bound Value to be satisfied. |
higher | [in] Higher-bound Value to be satisfied. |
restriction | [in] Objects to limit the select in this set of objects. |
ValueArray* Graph::SetArrayAttribute | ( | oid_t | oid, |
attr_t | attr, | ||
const Value & | value | ||
) |
Sets all the elements of the ValueArray for the given array attribute and OID and returns it.
Initializing the array with one of these SetArrayAttribute methods is the only way to create the array. But once created it can be updated using the ValueArray. And you can get it again with the GetArrayAttribute operation.
oid | [in] Sparksee OID. |
attr | [in] Sparksee array attribute identifier. |
value | [in] Value for all the array elements of the given attribute and OID. |
Sets all the elements of the ValueArray for the given array attribute and OID.
Initializing the array with one of these SetArrayAttribute methods is the only way to create the array. But once created it can be updated using the ValueArray which can be obtained using the GetArrayAttribute operation.
Sets the value of the given attribute for all the objects of the types the attribute applies to.
Does not work for TEXT attribute types
tx | The Transaction this operation belongs to |
attribute | The attribute to initialize |
value | The value to initialize the attribute to |
Sets a default value for an attribute.
The default value will be applied to all the new nodes or edges.
The given value must have the same DataType as the attribute or be a NULL value to remove the current default value.
attr | [in] The attribute. |
value | [in] The default value to use for this attribute. |
void Graph::SetAttributeText | ( | oid_t | oid, |
attr_t | attr, | ||
TextStream * | tstream | ||
) |
Sets the writable TextStream for the given text attribute and OID.
oid | [in] Sparksee OID. |
attr | [in] Sparksee attribute identifier. |
tstream | [in] New Text value. This corresponds to a TextStream to write. |
Gets all the tails from the given edges collection.
edges | [in] Sparksee edge identifier collection. |
Gets all the tails and heads from the given edges collection.
edges | [in] Sparksee edge identifier collection. |
tails | [in|out] If not NULL, all the tails will be stored here. |
heads | [in|out] If not NULL, all the heads will be stored here. |
KeyValues* Graph::TopK | ( | attr_t | attribute, |
Condition | operation, | ||
const Value & | lower, | ||
const Value & | higher, | ||
Order | order, | ||
int32_t | k | ||
) |
Gets a KeyValues iterator as a result of the TopK operation.
attribute | The attribute to perform the TopK on |
operation | The operation to perform in the top k |
lower | The lower bound Value to be satisfied |
higher | The upper bound Value to be satisfied |
order | The ordering semantincs of the top-k |
k | The size of the TopK |
KeyValues* Graph::TopK | ( | attr_t | attribute, |
Condition | operation, | ||
const Value & | lower, | ||
Order | order, | ||
int32_t | k, | ||
Objects * | restriction | ||
) |
Gets a KeyValues iterator as a result of the TopK operation.
attribute | The attribute to perform the TopK on |
operation | The operation to perform in the top k |
lower | The lower bound Value to be satisfied |
order | The ordering semantincs of the top-k |
k | The size of the TopK |
restricton | Objects to limit the topk to this set of objects |
KeyValues* Graph::TopK | ( | attr_t | attribute, |
Condition | operation, | ||
const Value & | lower, | ||
const Value & | higher, | ||
Order | order, | ||
int32_t | k, | ||
Objects * | restriction | ||
) |
Gets a KeyValues iterator as a result of the TopK operation.
attribute | The attribute to perform the TopK on |
operation | The operation to perform in the top k |
lower | The lower bound Value to be satisfied |
higher | The upper bound Value to be satisfied |
order | The ordering semantincs of the top-k |
k | The size of the TopK |
restricton | Objects to limit the topk to this set of objects |