Interface Assignment<T>

Type Parameters:
T - item-type.
All Known Implementing Classes:
ObjectVoxelIntersection, OverlappingObjects

public interface Assignment<T>
A one-to-one pairing between items in two respective sets.

Any item used in one pairing, may not be used in another.

The two sets are referred to as left and right respectively.

The terminology is borrowed from the the assignment problem.

Statistics are also associated with the assignment, giving different measures of how successful the assignment was.

Author:
Owen Feehan
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    The number of items that are paired.
    int
    numberUnassigned(boolean left)
    The number of items in a particular set that are not paired.
    paired(boolean left)
    The items that are paired for a particular set.
    The statistics associated with the assignment.
    unassigned(boolean left)
    The items that are not paired for a particular set.
  • Method Details

    • numberPaired

      int numberPaired()
      The number of items that are paired.

      This is necessarily the same number for either set.

      Returns:
      the total number of pairings.
    • numberUnassigned

      int numberUnassigned(boolean left)
      The number of items in a particular set that are not paired.
      Parameters:
      left - if true, the left-set is considered, otherwise the right-set.
      Returns:
      the number of unpaired items for the respective set.
    • paired

      List<T> paired(boolean left)
      The items that are paired for a particular set.
      Parameters:
      left - if true, the left-set is considered, otherwise the right-set.
      Returns:
      a newly created list containing the paired items.
    • unassigned

      List<T> unassigned(boolean left)
      The items that are not paired for a particular set.
      Parameters:
      left - if true, the left-set is considered, otherwise the right-set.
      Returns:
      a newly created list containing the unpaired items for the respective set.
    • statistics

      StatisticsToExport statistics()
      The statistics associated with the assignment.
      Returns:
      the statistics.