Constructor and Description |
---|
Link(Node from,
Node to)
Initializes a new instance of the
Link class with the parent node specified in [from] and the child in [to]. |
Link(Node from,
Node to,
int temporalOrder)
Initializes a new instance of the
Link class with a specified [temporalOrder], the parent node specified in [from] and the child in [to]. |
Modifier and Type | Method and Description |
---|---|
Link |
copy(Node from,
Node to,
int temporalOrder)
Creates a new link, copying the properties from this instance, such as
getDescription() and getCustomProperties() . |
CustomPropertyCollection |
getCustomProperties()
Gets custom properties associated with this instance.
|
String |
getDescription()
Optional description for the link.
|
Node |
getFrom()
The parent node of the directed link.
|
int |
getIndex()
The Index of this instance in the collection of links belonging to a network, or -1 if the link does not belong to a network.
|
Network |
getNetwork()
The
Network the link belongs to. |
NoisyOrder |
getNoisyOrder()
Gets a value which determines the nature of the effect between the parent node (from) and a noisy child node (to).
|
int |
getTemporalOrder()
Gets the temporal order of the link.
|
Node |
getTo()
The child node of the directed link.
|
void |
setDescription(String value)
Optional description for the link.
|
void |
setNoisyOrder(NoisyOrder value)
Sets a value which determines the nature of the effect between the parent node (from) and a noisy child node (to).
|
public Link(Node from, Node to)
Link
class with the parent node specified in [from] and the child in [to].from
- The parent node.to
- The child node.NullPointerException
- Raised if either [from] or [to] is null.public Link(Node from, Node to, int temporalOrder)
Link
class with a specified [temporalOrder], the parent node specified in [from] and the child in [to].
If a temporal order is specified that is greater than zero, then a link can connect two nodes (which may be the same) at different times.from
- The parent node.to
- The child node.temporalOrder
- The temporal order. Must be greater than or equal to zero.NullPointerException
- Raised if either [from] or [to] is null.IllegalArgumentException
- Raised if [temporalOrder] is negative.public Link copy(Node from, Node to, int temporalOrder)
getDescription()
and getCustomProperties()
.from
- The parent node.to
- The child node.temporalOrder
- The temporal order. Must be greater than or equal to zero.public CustomPropertyCollection getCustomProperties()
public int getIndex()
public String getDescription()
public void setDescription(String value)
public int getTemporalOrder()
public NoisyOrder getNoisyOrder()
public void setNoisyOrder(NoisyOrder value)
public Node getFrom()
public Node getTo()
Copyright © 2023. All rights reserved.