|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--uwcse.location.core.Sample
A Sample contains a state and an associated importance weight.
| Constructor Summary | |
Sample()
Create a new sample with the default state and a weight of 0. |
|
Sample(Sample samp)
Create a new sample from an existing sample. |
|
Sample(State state)
Create a new sample with the given State and weight of 1. |
|
Sample(State state,
double weight)
Create a new sample with the given State and weight. |
|
| Method Summary | |
Object |
clone()
Overridden to perform a deep copy on the Sample. |
boolean |
equals(Object o)
Test for semantic equality to another Sample, that is, the weights are the same and this.getState().equals(samp.getState()) returns
true. |
State |
getState()
Access the State of this sample |
double |
getWeight()
Get the importance weight of this sample. |
void |
setState(State s)
Set a new state for this sample. |
void |
setWeight(double weight)
Set the importance weight of this sample. |
String |
toString()
Return a string representation of this Sample. |
| Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public Sample()
public Sample(Sample samp)
public Sample(State state)
public Sample(State state,
double weight)
| Method Detail |
public Object clone()
clone in class Objectpublic double getWeight()
public void setWeight(double weight)
public State getState()
public void setState(State s)
public boolean equals(Object o)
this.getState().equals(samp.getState()) returns
true.
equals in class Objectpublic String toString()
toString in class Object
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||