cnReorderNodes: Reorder Network Nodes

cnReorderNodes-methodR Documentation

Reorder Network Nodes

Description

The function rearranges the nodes of a network according to a new order.

Usage

cnReorderNodes(object, nodeIndices)

Arguments

object

a catNetwork

nodeIndices

a vector representing the new node order

Details

Node reordering affects the list of node names, parents and probabilities. It is a useful operation in cases when comparison of two networks is needed.

Value

A catNetwork object.

Author(s)

N. Balov, P. Salzman

Examples

  cnet <- cnRandomCatnet(numnodes=10, maxParents=3, numCategories=2)
  cnMatParents(cnet)
  cnet1 <- cnReorderNodes(object=cnet, nodeIndices=cnOrder(cnet))
  cnNodes(object=cnet1)
  cnMatParents(cnet1)

catnet documentation built on Nov. 10, 2022, 5:08 p.m.