My Project
Static Public Member Functions | Static Private Member Functions | List of all members
KnowledgeOperators Class Reference

Static Public Member Functions

static boolean includes (KnowledgeField a, KnowledgeField b)
 
static boolean isThereAnyIntersection (KnowledgeBase K1, KnowledgeBase K2)
 
static double getSimilarityIndex (KnowledgeBase K1, KnowledgeBase K2)
 
static KnowledgeBase dempsterShafer (KnowledgeBase startingEvidence, KnowledgeBase newEvidence, CommonKnowledge frame)
 

Static Private Member Functions

static double maxSimilaritySum (double simil[][], int n_rows, int n_columns, int pos_columns[], int r)
 

Detailed Description

Knowledge operators which:

Member Function Documentation

static KnowledgeBase KnowledgeOperators.dempsterShafer ( KnowledgeBase  startingEvidence,
KnowledgeBase  newEvidence,
CommonKnowledge  frame 
)
inlinestatic

Implements Dempster-Shafer's combination rule. Receives two bodies of knowledge that combines into one, which returns. Also needs common knowledge as argument.

Parameters
startingEvidence
newEvidence
frame
Returns
static double KnowledgeOperators.getSimilarityIndex ( KnowledgeBase  K1,
KnowledgeBase  K2 
)
inlinestatic

Evaluates and index of similarity of two knowledge bases. Needs CommonKnowledge. Yields values in [0,1] where 0 means no similarity, 1 means equality. Each knowledge field of a knowledge base is considered only once. Among its similarity values with all knowledge fields of the other knowledge base, the highest is taken. If a knowledge field has two equal similarity values with two other knowledge fields, the one intersection is chosen whose two knowledge fields have lowest similarity values elsewhere. In early versions, this was used to select rivals. In more recent version , it is only used in order to draw the similarity network.

Parameters
K1
K2
Returns
static boolean KnowledgeOperators.includes ( KnowledgeField  a,
KnowledgeField  b 
)
inlinestatic

Checks whether two knowledge fields are included in one another.

Parameters
a
b
Returns
static boolean KnowledgeOperators.isThereAnyIntersection ( KnowledgeBase  K1,
KnowledgeBase  K2 
)
inlinestatic

Checks whether two bodies of knowledge have any intersecting field. Needs CommonKnowledge.

Parameters
K1
K2
Returns
static double KnowledgeOperators.maxSimilaritySum ( double  simil[][],
int  n_rows,
int  n_columns,
int  pos_columns[],
int  r 
)
inlinestaticprivate

simil = matrice delle intersezioni n_rows, n_colums numero di righe e colonne pos_columns la posizione di ogni colonna per ogni riga (la configurazione, è una disposizione di colonne per le righe) r,c riga e colonna alla quale siamo arrivati

  • 1. scegliere riga e colonna
  • 2. siamo alla fine? calcola la similarity sum e restituiscila come max_sum (return) altrimenti
  • 3. richiama in modo ricorsivo maxSimilaritySum con un ciclo for(int i=0; i<num_col; i++) combinazione per ogni colonna -> chiamata ricorsiva a maxsimilaritysum() controllo di impossibilità (colonne uguali)
  • 4. se il valore è maggiore a max_sum, sostituiscilo
  • 5. restituisci max_sum
Parameters
similIntersections matrix
n_rowsRows number
n_columnsColumns number
pos_columnsPosition of each column for each row (the configuration, is a disposition of of columns for rows)
rrow where we are arrived
Returns

The documentation for this class was generated from the following file: