|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectes.ants.felixgm.trmsim_wsn.outcomes.Outcome
public abstract class Outcome
This class models the outcome of a trust and reputation model. It includes
the Satisfaction of the client with the received service
| Field Summary | |
|---|---|
protected Satisfaction |
satisfaction
Satisfaction of the client with the received service |
| Constructor Summary | |
|---|---|
protected |
Outcome(Satisfaction satisfaction)
Class Outcome constructor |
| Method Summary | |
|---|---|
abstract Outcome |
aggregate(java.util.Collection<Outcome> outcomes)
This method computes the average of all the given outcomes |
static Outcome |
computeOutcomes(java.util.Collection<Outcome> outcomes)
Returns an outcome with the average and standard deviation of a collection of outcomes |
static Outcome |
computeOutcomes(java.util.Collection<Outcome> outcomes,
Network network,
Service requiredService,
int numExecutions)
This method computes the average of all the given outcomes, provided by the clients of the given network and, additionally, |
Satisfaction |
get_satisfaction()
This method returns the satisfaction of the client with the received service |
protected java.lang.String |
getOutcomesFileLine()
This method returns the line of the file where to save this outcome, including all its elements |
java.lang.String |
toString()
|
static void |
writeToFile(java.util.Collection<Outcome> outcomes,
java.lang.String fileName)
Writes the elements of a collection of outcomes into a given file. |
void |
writeToFile(java.lang.String fileName)
Writes the output of this outcome toString() method into a given file |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Satisfaction satisfaction
| Constructor Detail |
|---|
protected Outcome(Satisfaction satisfaction)
satisfaction - Satisfaction of the client with the received service| Method Detail |
|---|
public abstract Outcome aggregate(java.util.Collection<Outcome> outcomes)
outcomes - Outcomes to be aggregated
public static Outcome computeOutcomes(java.util.Collection<Outcome> outcomes,
Network network,
Service requiredService,
int numExecutions)
outcomes - Outcomes to be aggregatednetwork - The network the given outcomes come fromrequiredService - The requested servicenumExecutions - The number of executions of the trust and/or reputation model over the given network
public static Outcome computeOutcomes(java.util.Collection<Outcome> outcomes)
outcomes - Outcomes to compute (aggregate)
public java.lang.String toString()
toString in class java.lang.Objectprotected java.lang.String getOutcomesFileLine()
public void writeToFile(java.lang.String fileName)
throws java.lang.Exception
fileName - Path of the file where to write this outcome
java.lang.Exception
public static void writeToFile(java.util.Collection<Outcome> outcomes,
java.lang.String fileName)
outcomes - Outcomes where to get the average and standard deviation satisfaction to
write to the filefileName - Path of the file where to writepublic Satisfaction get_satisfaction()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||