⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 spatialmodel.java

📁 Java source code for the Ant Colony Optimization Problem.
💻 JAVA
字号:
package jwo.jpss.spatial;   // Part of the spatial modelling package.

//  **************************************************************
/** Identifies minimum state and behaviour of all spatial models. 
  * @author Jo Wood.
  * @version 1.3, 20th October, 2001
  */
//  **************************************************************

public interface SpatialModel
{   
    // -------------------- Class variables ----------------------

    // Model type constants.
           /** Indentifies the spatial model is unknown. */
    public static final int UNKNOWN_MODEL = 100;
            /** Indentifies the spatial model as a 2d raster. */
    public static final int RASTER_2D = 101;
           /** Indentifies the spatial model as a 2d vector. */
    public static final int VECTOR_2D = 102;
           /** Indentifies the spatial model as a 3d raster. */
    public static final int RASTER_3D = 103;
           /** Indentifies the spatial model as a 3d vector. */
    public static final int VECTOR_3D = 104;
    
    // Query constants.
           /** Indicates the value of the spatial model is undefined. */
    public static final float NO_VALUE = Float.MIN_VALUE;
           /** Indicates that query is outside bounds of model. */
    public static final float OUT_OF_BOUNDS = Float.MAX_VALUE;

    // Spatial type constants.
           /** Identifies a point object. */
    public static final int POINT = 0;
           /** Identifies a linear object. */
    public static final int LINE = 1;
           /** Identifies an areal object. */
    public static final int AREA = 2;
           /** Identifies a volumetric object. */
    public static final int VOLUME = 3;
    
    // Spatial comparison constants.
           /** Identifies this object as being within another. */
    public static final int WITHIN = 1;
           /** Identifies this object as matching another. */
    public static final int MATCHES = 2;
           /** Identifies this object as overlapping another. */
    public static final int OVERLAPS = 3;
           /** Identifies this object as enclosing another. */
    public static final int ENCLOSES = 4;
           /** Identifies this object as being adjacent to another. */
    public static final int ADJACENT = 5;
           /** Identifies this object as being separate from another. */
    public static final int SEPARATE = 6;

 
    // ------------------- Interface Methods ---------------------
    
    /** Reports the type of spatial model.
      * @return Type of spatial model (RASTER_2D, VECTOR_3D etc). 
      */
    public int getType();

   /** Reports the attribute of the model at the given location.
     * @param location Location to query.
     * @return Attribute at given location or NO_VALUE if none defined.
     */
    public float getAttribute(Footprint location);

   /** Reports the outer boundaries of the object.
     * @return Outer boundary of the spatial object.
     */
    public Footprint getBounds();

   /** Sets the outer boundaries of the object.
     * @param bounds New outer boundary of the object.
     */
    public void setBounds(Footprint bounds);

   /** Performs a spatial comparison between this object and another.
     * @param other Other spatial object to compare with this one.
     * @return Type of spatial relationship (OVERLAPS, SEPARATE etc).
     */
    public int compare(SpatialModel other);

   /** Reports the header information associated with this object.
     * @return Header information (title, copyright etc).
     */
    public Header getHeader();
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -