Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Related Pages

ScoreMatrixStruct Struct Reference
[Scorematrix - The matrix of scores appearing in each ConstraintEdge]

Collaboration diagram for ScoreMatrixStruct:

Collaboration graph
[legend]

Detailed Description

The score matrix

Since not all matrices in the edges of a constraint net are of equal size, each matrix administrates the number of its rows and columns explicitly in addition to the array itself. The element (r,c) in a score matrix is always referenced by

sm->entries[c * sm->rows + r]

The last element of a matrix always has the index

sm->rows * sm->cols -1

The type ScoreMatrix is only used in a ConstraintEdge. A similar function is fulfilled by the structure ScoreCache defined by the module Scache - Cache structures for binary LV scores, which has the advantage of being usable even without constraint edges.

Definition at line 75 of file scorematrix.c.

Data Fields

int cols
SMEntryentries
int rows


Field Documentation

int ScoreMatrixStruct::cols
 

number of columns in the matrix Definition at line 77 of file scorematrix.c.

Referenced by smDelete(), smNew(), and smSetAllFlags().

SMEntry* ScoreMatrixStruct::entries
 

entries in the matrix Definition at line 78 of file scorematrix.c.

Referenced by smDelete(), smGetFlag(), smGetScore(), smNew(), smSetAllFlags(), smSetFlag(), and smSetScore().

int ScoreMatrixStruct::rows
 

number of rows in the matrix Definition at line 76 of file scorematrix.c.

Referenced by smDelete(), smGetFlag(), smGetScore(), smNew(), smSetAllFlags(), smSetFlag(), and smSetScore().


The documentation for this struct was generated from the following file:
CDG 0.95 (20 Oct 2004)