Class LayerProb
java.lang.Object
|
+--FileDefaultable
|
+--Layer
|
+--LayerProb
- All Implemented Interfaces:
- java.lang.Cloneable, java.lang.Comparable, java.io.Serializable
- public class LayerProb
- extends Layer
A layer that decides at random if it contains an object.
- See Also:
- Serialized Form
|
Field Summary |
(package private) double |
prob
The probability that the layer includes an object. |
private static long |
serialVersionUID
|
|
Constructor Summary |
(package private) |
LayerProb(double prob)
Build a layer including an object with a given probability. |
|
Method Summary |
java.lang.Object |
clone()
Make a copy of this Layer. |
void |
copy(FileDefaultable thatitem)
Copy the value of another ProbLayer into this. |
boolean |
isMember(java.lang.Object target)
True with probability prob. |
| Methods inherited from class FileDefaultable |
absorb, add, check, checkAll, cloneSet, compareTo, equals, getAll, getAll, getArray, getDefs, getExisting, getFile, getFixed, getGlobal, getMin, lookup, lookup, mergeDelete, mergeFile, seperate, sortOut, toString, toSuperString |
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
serialVersionUID
private static final long serialVersionUID
prob
double prob
- The probability that the layer includes an object.
LayerProb
LayerProb(double prob)
- Build a layer including an object with a given probability.
clone
public java.lang.Object clone()
- Make a copy of this Layer.
- Overrides:
clone in class Layer
copy
public void copy(FileDefaultable thatitem)
- Copy the value of another ProbLayer into this.
- Overrides:
copy in class Layer
isMember
public boolean isMember(java.lang.Object target)
- True with probability prob.
It is not guaranteed that a given object will get the
same result each time. Successive calls are (nearly) independant
- Overrides:
isMember in class Layer