es.ants.felixgm.trmsim_wsn.trm.eigentrust
Class GatheredInformationEigenTrust

java.lang.Object
  extended by es.ants.felixgm.trmsim_wsn.trm.GatheredInformation
      extended by es.ants.felixgm.trmsim_wsn.trm.eigentrust.GatheredInformationEigenTrust

public class GatheredInformationEigenTrust
extends GatheredInformation

This class models the information gathered by a Sensor implementing EigenTrust model

Since:
0.2
Version:
0.2
Author:
Félix Gómez Mármol, Gregorio Martínez Pérez and Antonio Bernárdez

Field Summary
 
Fields inherited from class es.ants.felixgm.trmsim_wsn.trm.GatheredInformation
pathsToServers
 
Constructor Summary
GatheredInformationEigenTrust(java.util.Collection<java.util.Vector<Sensor>> pathsToServers, int numSensors)
          Class GatheredInformationEigenTrust constructor
 
Method Summary
 double[][] get_normalizedLocalTrustValuesMatrix()
          Gets the normalized local trust values matrix, C=(c_{ij})
 java.util.Vector<Sensor> getPathToServer(int serverId)
          This method returns the path leading to a given server
 void setCollectionClients(java.util.Collection<java.util.Vector<Sensor>> pathsToClients)
          This method establishes the set of paths leading from a certain client to all the reachable clients
 void setNormalizedTrustValue(EigenTrust_Sensor sensor)
          This method sets the normalized trust value c_{ij}
 
Methods inherited from class es.ants.felixgm.trmsim_wsn.trm.GatheredInformation
getPathsToServers, setCollectionServers
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GatheredInformationEigenTrust

public GatheredInformationEigenTrust(java.util.Collection<java.util.Vector<Sensor>> pathsToServers,
                                     int numSensors)
Class GatheredInformationEigenTrust constructor

Parameters:
pathsToServers - Set of paths leading from a certain client to all the reachable servers
numSensors - Number of sensors composing the network
Method Detail

setNormalizedTrustValue

public void setNormalizedTrustValue(EigenTrust_Sensor sensor)
This method sets the normalized trust value c_{ij}

Parameters:
sensor - Sensor j

getPathToServer

public java.util.Vector<Sensor> getPathToServer(int serverId)
This method returns the path leading to a given server

Parameters:
serverId - Server identifier
Returns:
The path leading to a given server

setCollectionClients

public void setCollectionClients(java.util.Collection<java.util.Vector<Sensor>> pathsToClients)
This method establishes the set of paths leading from a certain client to all the reachable clients

Parameters:
pathsToClients - Set of paths leading from a certain client to all the reachable clients

get_normalizedLocalTrustValuesMatrix

public double[][] get_normalizedLocalTrustValuesMatrix()
Gets the normalized local trust values matrix, C=(c_{ij})

Returns:
The normalized local trust values matrix, C=(c_{ij})