distGraph-class

Class "distGraph"

A class definition for graphs that are based on distances.

Keywords
classes
Objects from the Class

Objects can be created by calls of the form new("distGraph", ...).

Slots

Dist:
Object of class "dist" that forms the basis for the edge weights used in the distGraph.

Extends

Class "graph", directly.

Methods

show
signature(object = "distGraph"): a print method
Dist
signature(object = "distGraph"): return the dist object.
adj
signature(object = "distGraph"): find the nodes adjacent to the supplied node.
nodes
signature(object = "distGraph"): return the nodes in the graph.
numNodes
signature(object = "distGraph"): return the number of nodes.
threshold
signature(object = "distGraph", k, value): set all distances that are larger than the supplied threshold, k, to the supplied value. The default is value is zero (and so is appropriate for similarities, rather than distances).
initialize
signature(object = "distGraph"): initialize a distGraph instance.
edgeWeights
Return a list of edge weights in a list format similar to the edges method.
edgeL
signature(graph = "distGraph"): A method for obtaining the edge list.

References

Shamir's paper and Butte et al

See Also

graph-class, clusterGraph-class

Aliases
  • distGraph-class
  • threshold
  • Dist
  • [.dist
  • distGraph-class
  • adj,distGraph,ANY-method
  • Dist,distGraph-method
  • edges,distGraph,missing-method
  • edges,distGraph,character-method
  • edgeL,distGraph-method
  • nodes,distGraph-method
  • numNodes,distGraph-method
  • show,distGraph-method
  • threshold,distGraph-method
  • edgeWeights,distGraph-method
  • edgeWeights,distGraph,ANY-method
  • initialize,distGraph-method
Examples
   set.seed(123)
   x <- rnorm(26)
   names(x) <- letters
   library(stats)
   d1 <- dist(x)
   g1 <- new("distGraph", Dist=d1)
Documentation reproduced from package graph, version 1.50.0, License: Artistic-2.0

Community examples

Looks like there are no examples yet.