trust_system_lib
Class TnaSlTM

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

public class TnaSlTM
extends java.lang.Object
implements TrustAlg

The TnaSlTM class conforms to the TrustAlg interface and implements the 'Trust Network Analysis with Subjective Logic' approach of Josang et. al.


Field Summary
private  Opinion[][] matrixA
          Scratch space matrix for multiplication purposes.
private  Opinion[][] matrixB
          Scratch space matrix for multiplication purposes.
private  Opinion[][] max_matrix
          Matrix storing max-confidence Opinions seen during multiplication.
private  Network nw
          The Network which this EigenTM is managing.
private  Opinion[][] op_stor
          Matrix storing persistent Opinion objects for each relation.
 
Constructor Summary
TnaSlTM(Network nw)
          Construct a TnaSlTM 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.
private  Opinion[][] subj_square(Opinion[][] source)
          Complete a single multiplication per the TNA-SL specification.
 void update(Transaction trans)
          Interfaced: Given coordinates of a feedback commitment, update as needed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nw

private Network nw
The Network which this EigenTM is managing.


op_stor

private Opinion[][] op_stor
Matrix storing persistent Opinion objects for each relation.


max_matrix

private Opinion[][] max_matrix
Matrix storing max-confidence Opinions seen during multiplication.


matrixA

private Opinion[][] matrixA
Scratch space matrix for multiplication purposes.


matrixB

private Opinion[][] matrixB
Scratch space matrix for multiplication purposes.

Constructor Detail

TnaSlTM

public TnaSlTM(Network nw)
Construct a TnaSlTM 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
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
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
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
Parameters:
user - Identifier of user performing trust computation
cycle - The current cycle

subj_square

private Opinion[][] subj_square(Opinion[][] source)
Complete a single multiplication per the TNA-SL specification.

Parameters:
source - The Opinion matrix which is to be squared
Returns:
Resulting matrix if multiply improved trust, NULL otherwise