eZPublish(LegacyStack)  5.1
eZDiffMatrix Class Reference

Public Member Functions

 eZDiffMatrix ($rows=null, $cols=null)
 
 get ($row, $col)
 
 set ($row, $col, $value)
 
 setSize ($nRows, $nCols)
 

Public Attributes

 $Cols
 Internal variable, width of the matrix. More...
 
 $Matrix = array()
 Internal array, holding necessary values. More...
 
 $Rows
 Internal variable, height of the matrix. More...
 

Detailed Description

This class will store values concerned with diff data

The eZDiffMatrix class will avoid storing 0, which for a large matrix will save memory.

Member Function Documentation

eZDiffMatrix::eZDiffMatrix (   $rows = null,
  $cols = null 
)

Constructor

eZDiffMatrix::get (   $row,
  $col 
)

This method will return the value at position ($row, $col)

eZDiffMatrix::set (   $row,
  $col,
  $value 
)

This method will set ($row, $col) in the matrix to $value, if it is not zero.

eZDiffMatrix::setSize (   $nRows,
  $nCols 
)

Sets the dimensions of the matrix

Member Data Documentation

eZDiffMatrix::$Cols

Internal variable, width of the matrix.

eZDiffMatrix::$Matrix = array()

Internal array, holding necessary values.

eZDiffMatrix::$Rows

Internal variable, height of the matrix.


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