edu.iu.cnets.klatsch.lang
Class VGraph

java.lang.Object
  extended by edu.iu.cnets.klatsch.lang.Value
      extended by edu.iu.cnets.klatsch.lang.VGraph

public class VGraph
extends Value

This value type encapsulates a graph object.


Field Summary
(package private)  Graph g
           
 
Constructor Summary
VGraph(Graph g)
          Initializes with the underlying graph data.
 
Method Summary
 Value method_actorgraph(Value... args)
          actorgraph() : Returns the actor-only subgraph.
 Value method_actormemegraph(Value... args)
          actormemegraph() : Returns the actor-meme (bipartite) subgraph.
 Value method_add(Value... args)
          add(e) : Adds the given edge to the graph.
 Value method_cc(Value... args)
          cc() : Returns the mean clustering coefficient.
 Value method_comp_count(Value... args)
          comp_count() : Returns the number of connected components.
 Value method_comp_size(Value... args)
          comp_size() : Returns a list containing the size of each connected component.
 Value method_comp(Value... args)
          comp(n) : Returns component #n in the graph.
 Value method_diameter(Value... args)
          diameter() : Returns the graph diameter.
 Value method_e(Value... args)
          e() : Returns the number of edges in the graph.
 Value method_edges(Value... args)
          edges() : Returns a stream of edges in the graph.
 Value method_ei(Value... args)
          ei(n) : Returns a stream of edges with node n as a destination.
 Value method_eo(Value... args)
          eo(n) : Returns a stream of edges with node n as a source.
 Value method_export(Value... args)
          export(s1, s2) : Exports the graph to file s1, using format s2.
 Value method_get(Value... args)
          get(e) : Returns edge e from the graph.
 Value method_has(Value... args)
          has(e) : Returns true if edge e is in the graph.
 Value method_ki(Value... args)
          ki(n) : Returns the in-degree of node n.
 Value method_kipower(Value... args)
          kipower() : Returns a power-law fit for the in-degree.
 Value method_ko(Value... args)
          ko(n) : Returns the out-degree of node n.
 Value method_kopower(Value... args)
          kopower() : Returns a power-law fit for the out-degree.
 Value method_layout(Value... args)
          layout() : Performs a layout operation using default parameters.
 Value method_memegraph(Value... args)
          memegraph() : Returns the meme-only subgraph.
 Value method_modularity(Value... args)
          modularity(): Returns the modularity measure.
 Value method_n(Value... args)
          n() : Returns the number of nodes in the graph.
 Value method_ni(Value... args)
          ni() : Returns the number of destination nodes in the graph.
 Value method_no(Value... args)
          no() : Returns the number of source nodes in the graph.
 Value method_nodes(Value... args)
          nodes() : Returns a stream of nodes in the graph.
 Value method_pathlength(Value... args)
          pathlength() : Returns the mean path length.
 Value method_si(Value... args)
          si(n) : Returns the in-strength of node n.
 Value method_so(Value... args)
          so(n) : Returns the out-strength of node n.
 Value method_trusted(Value... args)
          trusted() : Returns the trusted subgraph.
 java.lang.String toJson()
          Returns a JSON representation of the graph.
 java.lang.String toString()
          Returns a printed representation of the graph.
 
Methods inherited from class edu.iu.cnets.klatsch.lang.Value
require, requireCount, requireType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

g

Graph g
Constructor Detail

VGraph

VGraph(Graph g)
Initializes with the underlying graph data.

Parameters:
g - the graph to encapsulate
Method Detail

toString

public java.lang.String toString()
Returns a printed representation of the graph.

Specified by:
toString in class Value
Returns:
a printable string

toJson

public java.lang.String toJson()
Returns a JSON representation of the graph.

Overrides:
toJson in class Value
Returns:
the JSON representation

method_actorgraph

public Value method_actorgraph(Value... args)
                        throws EvaluationException
actorgraph() : Returns the actor-only subgraph.

Throws:
EvaluationException

method_actormemegraph

public Value method_actormemegraph(Value... args)
                            throws EvaluationException
actormemegraph() : Returns the actor-meme (bipartite) subgraph.

Throws:
EvaluationException

method_add

public Value method_add(Value... args)
                 throws EvaluationException
add(e) : Adds the given edge to the graph.

Throws:
EvaluationException

method_cc

public Value method_cc(Value... args)
                throws EvaluationException
cc() : Returns the mean clustering coefficient.

Throws:
EvaluationException

method_comp

public Value method_comp(Value... args)
                  throws EvaluationException
comp(n) : Returns component #n in the graph.

Throws:
EvaluationException

method_comp_count

public Value method_comp_count(Value... args)
                        throws EvaluationException
comp_count() : Returns the number of connected components.

Throws:
EvaluationException

method_comp_size

public Value method_comp_size(Value... args)
                       throws EvaluationException
comp_size() : Returns a list containing the size of each connected component.

Throws:
EvaluationException

method_diameter

public Value method_diameter(Value... args)
                      throws EvaluationException
diameter() : Returns the graph diameter.

Throws:
EvaluationException

method_e

public Value method_e(Value... args)
               throws EvaluationException
e() : Returns the number of edges in the graph.

Throws:
EvaluationException

method_edges

public Value method_edges(Value... args)
                   throws EvaluationException
edges() : Returns a stream of edges in the graph.

Throws:
EvaluationException

method_ei

public Value method_ei(Value... args)
                throws EvaluationException
ei(n) : Returns a stream of edges with node n as a destination.

Throws:
EvaluationException

method_eo

public Value method_eo(Value... args)
                throws EvaluationException
eo(n) : Returns a stream of edges with node n as a source.

Throws:
EvaluationException

method_export

public Value method_export(Value... args)
                    throws EvaluationException
export(s1, s2) : Exports the graph to file s1, using format s2.

Throws:
EvaluationException

method_get

public Value method_get(Value... args)
                 throws EvaluationException
get(e) : Returns edge e from the graph.

Throws:
EvaluationException

method_has

public Value method_has(Value... args)
                 throws EvaluationException
has(e) : Returns true if edge e is in the graph. has(n) : Returns true if node n is in the graph.

Throws:
EvaluationException

method_ki

public Value method_ki(Value... args)
                throws EvaluationException
ki(n) : Returns the in-degree of node n. ki() : Returns a stream of in-degrees in the graph.

Throws:
EvaluationException

method_kipower

public Value method_kipower(Value... args)
                     throws EvaluationException
kipower() : Returns a power-law fit for the in-degree.

Throws:
EvaluationException

method_ko

public Value method_ko(Value... args)
                throws EvaluationException
ko(n) : Returns the out-degree of node n. ko() : Returns a stream of out-degrees in the graph.

Throws:
EvaluationException

method_kopower

public Value method_kopower(Value... args)
                     throws EvaluationException
kopower() : Returns a power-law fit for the out-degree.

Throws:
EvaluationException

method_layout

public Value method_layout(Value... args)
                    throws EvaluationException
layout() : Performs a layout operation using default parameters. layout(d) : Overrides the default parameters.

Throws:
EvaluationException

method_memegraph

public Value method_memegraph(Value... args)
                       throws EvaluationException
memegraph() : Returns the meme-only subgraph.

Throws:
EvaluationException

method_modularity

public Value method_modularity(Value... args)
                        throws EvaluationException
modularity(): Returns the modularity measure.

Throws:
EvaluationException

method_n

public Value method_n(Value... args)
               throws EvaluationException
n() : Returns the number of nodes in the graph.

Throws:
EvaluationException

method_ni

public Value method_ni(Value... args)
                throws EvaluationException
ni() : Returns the number of destination nodes in the graph.

Throws:
EvaluationException

method_no

public Value method_no(Value... args)
                throws EvaluationException
no() : Returns the number of source nodes in the graph.

Throws:
EvaluationException

method_nodes

public Value method_nodes(Value... args)
                   throws EvaluationException
nodes() : Returns a stream of nodes in the graph.

Throws:
EvaluationException

method_pathlength

public Value method_pathlength(Value... args)
                        throws EvaluationException
pathlength() : Returns the mean path length. (?)

Throws:
EvaluationException

method_si

public Value method_si(Value... args)
                throws EvaluationException
si(n) : Returns the in-strength of node n. si() : Returns a stream of in-strengths in the graph.

Throws:
EvaluationException

method_so

public Value method_so(Value... args)
                throws EvaluationException
so(n) : Returns the out-strength of node n. so() : Returns a stream of out-strengths in the graph.

Throws:
EvaluationException

method_trusted

public Value method_trusted(Value... args)
                     throws EvaluationException
trusted() : Returns the trusted subgraph.

Throws:
EvaluationException