Pnet-class | R Documentation |
"Pnet"
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.
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).
No methods defined with class "Pnet" in the signature; however, the following generic functions are available:
signature(net = "Pnet")
: Fetches network name.
signature(net = "Pnet", value="character")
:
Sets network name.
signature(net = "Pnet")
: Fetches network title.
signature(net = "Pnet",
value="character")
: Sets network title.
signature(net = "Pnet")
: Fetches name of hub
(Proficiency model) if this is a spoke network (Evidence model).
signature(net = "Pnet", value)
: Sets name of
hub model.
signature(net = "Pnet")
: Fetches name of
file in which network is saved.
signature(net = "Pnet", value)
: Sets name
of file in which network is saved.
signature(net = "Pnet")
: Fetches
documentation string for network.
signature(net = "Pnet",
value="character")
: Sets documentation string for network.
signature(net = "Pnet",
name="character")
: Finds a node by name.
signature(net = "Pnet", nodes =
"list")
: Copies nodes from hub model into spoke model.
signature(net = "Pnet", nodes =
"list")
: Removes copied nodes from hub model.
signature(hub = "Pnet", spoke = "Pnet")
:
Attaches spoke to hub, matching stub nodes in spoke with their
counterparts in the hub.
signature(motif = "Pnet", spoke = "Pnet")
:
Removes the spoke from the motif (combined hub and spoke).
signature(net = "Pnet")
: Performs
topological transformations on the net to make it ready for
inference.
signature(net = "Pnet")
: Saves the net
to a string which can be stored in a database.
signature(serial = "character")
:
Reverses the above procedure.
signature(factory, data)
: this is an
improved version of unserialize that assumes a store of networks.
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
.
Russell Almond
Pnet
.
The class NeticaBN
implements this protocol.
showClass("Pnet")
## Not run:
setIs("NeticaBN","Pnet")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.