clusterGraph-class

Class "clusterGraph"

A cluster graph is a special sort of graph for clustered data. Each cluster forms a completely connected subgraph. Three are no edges between clusters.

Keywords
classes
Objects from the Class

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

Slots

clusters:
Object of class "list" a list of the labels of the elements, one element of the list for each cluster.

Extends

Class "graph", directly.

Methods

connComp
signature(object = "clusterGraph"): find the connected components; simply the clusters in this case.
acc
signature(object = "clusterGraph"): find the accessible nodes from the supplied node.
adj
signature(object = "clusterGraph"): find the adjacent nodes to the supplied node.
nodes
signature(object = "clusterGraph"): return the nodes.
nodes<-
signature(object="clusterGraph", value="character"): replace the node names with the new labels given in value.
numNodes
signature(object = "clusterGraph"): return the number of nodes.
edgeWeights
Return a list of edge weights in a list format similar to the edges method.
edgeL
signature(graph = "clusterGraph"): A method for obtaining the edge list.
coerce
signature(from = "clusterGraph", to = "matrix"): Convert the clusterGraph to an adjacency matrix. Currently, weights are ignored. The conversion assumes no self-loops.

See Also

graph-class, distGraph-class

Aliases
  • clusterGraph-class
  • clusterGraph-class
  • adj,clusterGraph,ANY-method
  • coerce,clusterGraph,matrix-method
  • connComp,clusterGraph-method
  • edges,clusterGraph,missing-method
  • edges,clusterGraph,character-method
  • edgeL,clusterGraph-method
  • edgeWeights,clusterGraph-method
  • edgeWeights,clusterGraph,ANY-method
  • nodes,clusterGraph-method
  • nodes<-,clusterGraph,character-method
  • numNodes,clusterGraph-method
  • show,clusterGraph-method
Examples
  cG1 <- new("clusterGraph", clusters=list(a=c(1,2,3), b=c(4,5,6)))
  cG1
  acc(cG1, c("1", "2"))
Documentation reproduced from package graph, version 1.50.0, License: Artistic-2.0

Community examples

Looks like there are no examples yet.