net.aerith.misao.util.star
Class StarList

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.Vector
                    |
                    +--net.aerith.misao.util.PositionList
                          |
                          +--net.aerith.misao.util.star.StarPositionList
                                |
                                +--net.aerith.misao.util.star.StarList
Direct Known Subclasses:
CatalogStarList, StarImageList

public class StarList
extends StarPositionList

The StarList represents a list of Star.

See Also:
Serialized Form

Field Summary
private static int MERGE_BLEND
          The mode of merge method which represents to blend.
private static int MERGE_UNIFY
          The mode of merge method which represents to unify.
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData, serialVersionUID
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
StarList()
          Constructs an empty StarList.
StarList(java.util.Vector original_list)
          Copies the specified StarList and constructs a new StarList.
 
Method Summary
private  void addUnpacked(Star star)
          Unpacks the specified star and adds to the list.
 void adjustMagnitude(MagnitudeAdjustment ma)
          Adjusts the magnitude of all elements based on the specified function.
 StarList blend(double search_radius)
          Blends some elements within the specified radius and creates a new list which consists of the blended stars.
 StarList flatten()
          Unpacks all merged stars and creates a new flat list.
 void mapCoordinatesToXY(ChartMapFunction cmf)
          Maps the R.A.
 void mapCoordinatesToXY(ChartMapFunction cmf, DistortionField df)
          Maps the R.A.
 void mapXYToCoordinates(ChartMapFunction cmf)
          Maps the (x,y) position of all elements to the R.A.
 void mapXYToCoordinates(ChartMapFunction cmf, DistortionField df)
          Maps the (x,y) position of all elements to the R.A.
private  StarList merge(double search_radius, int mode)
          Merges some elements within the specified radius and creates a new list which consists of the merged stars.
 StarList unify(double search_radius)
          Unifies some elements with the same name and creates a new list which consists of the unified star data.
 
Methods inherited from class net.aerith.misao.util.star.StarPositionList
sort
 
Methods inherited from class net.aerith.misao.util.PositionList
createMinimumGlobalTree, map, shift
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, ensureCapacityHelper, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
, finalize, getClass, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

MERGE_UNIFY

private static final int MERGE_UNIFY
The mode of merge method which represents to unify.

MERGE_BLEND

private static final int MERGE_BLEND
The mode of merge method which represents to blend.
Constructor Detail

StarList

public StarList()
Constructs an empty StarList.

StarList

public StarList(java.util.Vector original_list)
Copies the specified StarList and constructs a new StarList.
Parameters:
original_list - the original_list to copy.
Method Detail

mapCoordinatesToXY

public void mapCoordinatesToXY(ChartMapFunction cmf)
Maps the R.A. and Decl. of all elements to the (x,y) position based on the specified ChartMapFunction.
Parameters:
cmf - the map function.

mapCoordinatesToXY

public void mapCoordinatesToXY(ChartMapFunction cmf,
                               DistortionField df)
Maps the R.A. and Decl. of all elements to the (x,y) position based on the specified ChartMapFunction.
Parameters:
cmf - the map function.
df - the distortion field.

mapXYToCoordinates

public void mapXYToCoordinates(ChartMapFunction cmf)
Maps the (x,y) position of all elements to the R.A. and Decl. based on the specified ChartMapFunction.
Parameters:
cmf - the map function.

mapXYToCoordinates

public void mapXYToCoordinates(ChartMapFunction cmf,
                               DistortionField df)
Maps the (x,y) position of all elements to the R.A. and Decl. based on the specified ChartMapFunction.
Parameters:
cmf - the map function.
df - the distortion field.

unify

public StarList unify(double search_radius)
Unifies some elements with the same name and creates a new list which consists of the unified star data. It only searches stars to unify within the specified radius. The R.A. and Decl., and (x,y) position must be set properly.
Parameters:
search_radius - the radius to search the counterparts to unify in degree.
Returns:
the new list.

blend

public StarList blend(double search_radius)
Blends some elements within the specified radius and creates a new list which consists of the blended stars. The R.A. and Decl., and (x,y) position must be set properly.
Parameters:
search_radius - the radius to search the counterparts to blend in degree.
Returns:
the new list.

merge

private StarList merge(double search_radius,
                       int mode)
Merges some elements within the specified radius and creates a new list which consists of the merged stars. Depending on the specified mode number, the stars within the radius are unified only if they have the same name, or are blended. The R.A. and Decl., and (x,y) position must be set properly.
Parameters:
search_radius - the radius to search the counterparts to merge in degree.
Returns:
the new list.

flatten

public StarList flatten()
Unpacks all merged stars and creates a new flat list.
Returns:
the new list.

addUnpacked

private void addUnpacked(Star star)
Unpacks the specified star and adds to the list.
Parameters:
star - the merged star to add.

adjustMagnitude

public void adjustMagnitude(MagnitudeAdjustment ma)
Adjusts the magnitude of all elements based on the specified function.
Parameters:
ma - the magnitude adjustment function.