net.aerith.misao.pixy.matching
Class DefaultMatchingSolver.MatchingPositionMap

java.lang.Object
  |
  +--net.aerith.misao.util.PositionMap
        |
        +--net.aerith.misao.pixy.matching.DefaultMatchingSolver.MatchingPositionMap
Enclosing class:
DefaultMatchingSolver

protected class DefaultMatchingSolver.MatchingPositionMap
extends PositionMap

The MatchingPositionMap represents a rectangular map of StarPositions.

It has functions to use or select only some bright stars, so the list will be sorted in order of magnitude. However, the specified list is copied in the constructor, so the original list will not change.


Fields inherited from class net.aerith.misao.util.PositionMap
accept_out_of_bounds, bottom_right, list, table, table_columns, table_rows, top_left
 
Constructor Summary
DefaultMatchingSolver.MatchingPositionMap(PositionMap original_map)
          Constructs a MatchingPositionMap from a PositionMap.
 
Method Summary
 void reduceDataTo(int count)
          Reduces the number of elements in the list.
 StarPositionList selectAllData()
          Selects all data on this map and returns a new sorted list.
 StarPositionList selectDataByPart(int count)
          Selects data up to the specified number by part and returns a new sorted list.
 
Methods inherited from class net.aerith.misao.util.PositionMap
acceptOutOfBounds, addPosition, addPosition, convertPosition, divide, divideByCircleCoverage, divideByUnit, exceptOutOfBounds, getAllPositions, getArea, getBottomLeftCorner, getBottomRightCorner, getCenter, getDividedPositionMapList, getHeight, getPartialList, getPartialListWithinRadius, getPartialListWithinSteps, getTopLeftCorner, getTopRightCorner, getWidth, isOutOfBounds, paramString, removePosition, toString
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Constructor Detail

DefaultMatchingSolver.MatchingPositionMap

public DefaultMatchingSolver.MatchingPositionMap(PositionMap original_map)
Constructs a MatchingPositionMap from a PositionMap. The list will be copied, but the elements are not copied.
Parameters:
original_map - the original map of positions.
Method Detail

reduceDataTo

public void reduceDataTo(int count)
Reduces the number of elements in the list. The list must be sorted previously, which is in general sorted in the constructor.
Parameters:
count - the number of elements in the list after reduction.

selectDataByPart

public StarPositionList selectDataByPart(int count)
Selects data up to the specified number by part and returns a new sorted list. The map must be divided previously. If not divided, it returns null.
Parameters:
count - the number of elements to select by part.
Returns:
the new list.

selectAllData

public StarPositionList selectAllData()
Selects all data on this map and returns a new sorted list.
Returns:
the new list.