Maintainer | Toshio Ito <debug.ito@gmail.com> |
---|---|
Safe Haskell | None |
Language | Haskell2010 |
A snapshot graph is a graph constructed from the NetSpider database. It reprensents a graph at specific time.
Synopsis
- type SnapshotGraph n na la = ([SnapshotNode n na], [SnapshotLink n la])
- graphTimestamp :: SnapshotGraph n na la -> Maybe Timestamp
- data SnapshotNode n na
- nodeId :: SnapshotNode n na -> n
- isOnBoundary :: SnapshotNode n na -> Bool
- nodeTimestamp :: SnapshotNode n na -> Maybe Timestamp
- nodeAttributes :: SnapshotNode n na -> Maybe na
- data SnapshotLink n la
- sourceNode :: SnapshotLink n la -> n
- destinationNode :: SnapshotLink n la -> n
- linkNodeTuple :: SnapshotLink n la -> (n, n)
- linkNodePair :: SnapshotLink n la -> Pair n
- isDirected :: SnapshotLink n la -> Bool
- linkTimestamp :: SnapshotLink n la -> Timestamp
- linkAttributes :: SnapshotLink n la -> la
SnapshotGraph
type SnapshotGraph n na la = ([SnapshotNode n na], [SnapshotLink n la]) Source #
The snapshot graph, which is a collection nodes and links.
Since: 0.3.1.0
graphTimestamp :: SnapshotGraph n na la -> Maybe Timestamp Source #
Get the timestamp of the graph. It's the latest timestamp of the nodes and links.
Since: 0.4.3.0
SnapshotNode
data SnapshotNode n na Source #
A node in the snapshot graph.
Instances
nodeId :: SnapshotNode n na -> n Source #
isOnBoundary :: SnapshotNode n na -> Bool Source #
This property is True
if the node is on the boundary of the
query. This means that nodes adjacent to this node may not be
included in the query result.
nodeTimestamp :: SnapshotNode n na -> Maybe Timestamp Source #
If the node is not observed yet or isOnBoundary
is True
, its
timestamp is Nothing
.
nodeAttributes :: SnapshotNode n na -> Maybe na Source #
If the node is not observed yet or isOnBoundary
is True
, its
node attributes is Nothing
.
SnapshotLink
data SnapshotLink n la Source #
A link in the snapshot graph.
SnapshotLink
is summary of one or more link observations by
different subject nodes. Basically the latest of these observations
is used to make SnapshotLink
.
- type
n
: node ID. - type
la
: link attributes.
Instances
sourceNode :: SnapshotLink n la -> n Source #
destinationNode :: SnapshotLink n la -> n Source #
linkNodeTuple :: SnapshotLink n la -> (n, n) Source #
Node-tuple (source node, destination node) of the link.
linkNodePair :: SnapshotLink n la -> Pair n Source #
Like linkNodeTuple
, but this returns a Pair
.
isDirected :: SnapshotLink n la -> Bool Source #
linkTimestamp :: SnapshotLink n la -> Timestamp Source #
linkAttributes :: SnapshotLink n la -> la Source #