trust_system_lib
Class EtIncTM

java.lang.Object
  extended by trust_system_lib.EigenTM
      extended by trust_system_lib.EtIncTM
All Implemented Interfaces:
TrustAlg

public class EtIncTM
extends EigenTM
implements TrustAlg

The EtIncTM class conforms to the TrustAlg interface and is nearly identical to the implementation of EigenTM. The difference is this version uses snapshot comparisons to avoid costly recalculation on every cycle.


Field Summary
private  int cur_skip
          Number of cycles to skip between each trust re-calculation.
private  double[] current
          Matrix storing trust values after the *previous* trust calculation.
private  double[] previous
          Matrix storing trust values after the *previous* trust calculation.
 
Fields inherited from class trust_system_lib.EigenTM
nw
 
Constructor Summary
EtIncTM(Network nw)
          Construct an EtIncTM object.
 
Method Summary
 java.lang.String algName()
          Interfaced: Text name of this trust algorithm (spaces are okay).
 void computeTrust(int user, int cycle)
          Interfaced: Compute trust, exporting trust values to Network.
 java.lang.String fileExtension()
          Interfaced: File extension placed on output files using this algorithm.
 void update(Transaction trans)
          Interfaced: Given coordinates of a feedback commitment, update as needed.
 
Methods inherited from class trust_system_lib.EigenTM
hasConverged, trustMultiply
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cur_skip

private int cur_skip
Number of cycles to skip between each trust re-calculation.


current

private double[] current
Matrix storing trust values after the *previous* trust calculation.


previous

private double[] previous
Matrix storing trust values after the *previous* trust calculation.

Constructor Detail

EtIncTM

public EtIncTM(Network nw)
Construct an EtIncTM object.

Parameters:
nw - Network which this EtIncTM will be managing
Method Detail

algName

public java.lang.String algName()
Interfaced: Text name of this trust algorithm (spaces are okay).

Specified by:
algName in interface TrustAlg
Overrides:
algName in class EigenTM
Returns:
Text name of this trust algorithm (spaces are okay)

fileExtension

public java.lang.String fileExtension()
Interfaced: File extension placed on output files using this algorithm.

Specified by:
fileExtension in interface TrustAlg
Overrides:
fileExtension in class EigenTM
Returns:
File extension placed on output files using this algorithm

update

public void update(Transaction trans)
Interfaced: Given coordinates of a feedback commitment, update as needed.

Specified by:
update in interface TrustAlg
Overrides:
update in class EigenTM
Parameters:
trans - Transaction detailing feedback commitment

computeTrust

public void computeTrust(int user,
                         int cycle)
Interfaced: Compute trust, exporting trust values to Network.

Specified by:
computeTrust in interface TrustAlg
Overrides:
computeTrust in class EigenTM
Parameters:
user - Identifier of user performing trust computation
cycle - The current cycle