Pnet-class: Class '"Pnet"'

Pnet-classR Documentation

Class "Pnet"

Description

This is a virtual class. Classes implementing the Pnet protocol should attach themselves using setIs.

Note that NULL is always considered a member so that uninitialized in containers.

Objects from the Class

A virtual Class: No objects may be created from it.

Classes can register as belonging to this abstract class. The trick for doing this is: setIs("NetClass","Pnet")

Currently NeticaBN is an example of an object of this class (but requires the PNetica package to provide all of the required functionality).

Methods

No methods defined with class "Pnet" in the signature; however, the following generic functions are available:

PnetName

signature(net = "Pnet"): Fetches network name.

PnetName<-

signature(net = "Pnet", value="character"): Sets network name.

PnetTitle

signature(net = "Pnet"): Fetches network title.

PnetTitle<-

signature(net = "Pnet", value="character"): Sets network title.

PnetHub

signature(net = "Pnet"): Fetches name of hub (Proficiency model) if this is a spoke network (Evidence model).

PnetHub<-

signature(net = "Pnet", value): Sets name of hub model.

PnetPathname

signature(net = "Pnet"): Fetches name of file in which network is saved.

PnetPathname<-

signature(net = "Pnet", value): Sets name of file in which network is saved.

PnetDescription

signature(net = "Pnet"): Fetches documentation string for network.

PnetDescription<-

signature(net = "Pnet", value="character"): Sets documentation string for network.

PnetFindNode

signature(net = "Pnet", name="character"): Finds a node by name.

PnetMakeStubNodes

signature(net = "Pnet", nodes = "list"): Copies nodes from hub model into spoke model.

PnetRemoveStubNodes

signature(net = "Pnet", nodes = "list"): Removes copied nodes from hub model.

PnetAdjoin

signature(hub = "Pnet", spoke = "Pnet"): Attaches spoke to hub, matching stub nodes in spoke with their counterparts in the hub.

PnetDetach

signature(motif = "Pnet", spoke = "Pnet"): Removes the spoke from the motif (combined hub and spoke).

PnetCompile

signature(net = "Pnet"): Performs topological transformations on the net to make it ready for inference.

PnetSerialize

signature(net = "Pnet"): Saves the net to a string which can be stored in a database.

PnetUnserialize

signature(serial = "character"): Reverses the above procedure.

unserializePnet

signature(factory, data): this is an improved version of unserialize that assumes a store of networks.

Pwned

R really doesn't want me to do this. I'm just having a lot of difficulty creating a class that extends something from a different package.

For now, need to use "ANY" instead of "Pnet" and then do explicit type checking with is.Pnet.

Author(s)

Russell Almond

See Also

Pnet.

The class NeticaBN implements this protocol.

Examples

showClass("Pnet")
## Not run: 
 setIs("NeticaBN","Pnet")

## End(Not run)

ralmond/Peanut documentation built on Sept. 19, 2023, 8:27 a.m.