ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
MappedDiff Class Reference
+ Inheritance diagram for MappedDiff:
+ Collaboration diagram for MappedDiff:

Public Member Functions

 MappedDiff ($from_lines, $to_lines, $mapped_from_lines, $mapped_to_lines)
 Constructor.
- Public Member Functions inherited from Diff
 Diff ($from_lines, $to_lines)
 Constructor.
 reverse ()
 Compute reversed Diff.
 isEmpty ()
 Check for empty diff.
 lcs ()
 Compute the length of the Longest Common Subsequence (LCS).
 orig ()
 Get the original set of lines.
 closing ()
 Get the closing set of lines.
 _check ($from_lines, $to_lines)
 Check a Diff for validity.

Additional Inherited Members

- Data Fields inherited from Diff
 $edits

Detailed Description

Definition at line 1328 of file class.WordLevelDiff.php.

Member Function Documentation

MappedDiff::MappedDiff (   $from_lines,
  $to_lines,
  $mapped_from_lines,
  $mapped_to_lines 
)

Constructor.

Computes diff between sequences of strings.

This can be used to compute things like case-insensitve diffs, or diffs which ignore changes in white-space.

Parameters
$from_linesarray An array of strings. (Typically these are lines from a file.)
$to_linesarray An array of strings.
$mapped_from_linesarray This array should have the same size number of elements as $from_lines. The elements in $mapped_from_lines and $mapped_to_lines are what is actually compared when computing the diff.
$mapped_to_linesarray This array should have the same number of elements as $to_lines.

Definition at line 1353 of file class.WordLevelDiff.php.

{
$fname = 'MappedDiff::MappedDiff';
//wfProfileIn( $fname );
assert(sizeof($from_lines) == sizeof($mapped_from_lines));
assert(sizeof($to_lines) == sizeof($mapped_to_lines));
$this->Diff($mapped_from_lines, $mapped_to_lines);
$xi = $yi = 0;
for ($i = 0; $i < sizeof($this->edits); $i++) {

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