it.unibo.cs.belief
Class Frame
java.lang.Object
it.unibo.cs.belief.Frame
public class Frame
- extends java.lang.Object
A frame of discernment. It contains all the elementary propositions that can be true...
This implementation of a frame is ordered, so that elements can be accessed directly
without looking up names.
- Version:
- 0.1
- Author:
- Matteo Magnani
Field Summary |
private java.lang.String[] |
names
|
Constructor Summary |
Frame(java.lang.String[] names)
Creates a frame of discernement by specifying its elements. |
Method Summary |
boolean |
equals(Frame f)
|
java.lang.String |
getName(int pos)
Returns the name of the element at a given position. |
int |
size()
Returns the cardinality of this frame. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
names
private java.lang.String[] names
Frame
public Frame(java.lang.String[] names)
- Creates a frame of discernement by specifying its elements.
The order of the array is the order in which the element names will be accessed.
Currently, it is not checked if there are repetitions (a frame is a set, so there
cannot be two elements that are equal).
- Parameters:
names
- the array of element names of the frame.
size
public int size()
- Returns the cardinality of this frame.
- Returns:
- the size (cardinality) of the frame.
getName
public java.lang.String getName(int pos)
- Returns the name of the element at a given position.
- Parameters:
pos
- the position of the element whose name is to be retrieved
- Returns:
- the name of the element at the specified position in the Frame.
equals
public boolean equals(Frame f)