coser.datamodel.decisionsystem
类 Ant

java.lang.Object
  继承者 coser.datamodel.decisionsystem.Ant

public class Ant
extends java.lang.Object

Project: The cost-sensitive rough sets project.

Summary: The Test Cost Sensitive Decision System with Ant Colony Optimization Author: Zilong Xu
Copyright: The source code and all documents are open and free. PLEASE keep this header while revising the program. Organizaion: Lab of Granular Computing, Zhangzhou Normal University, Fujian 363000, China.

Progress: Test-cost-sensitive attribute reduction based on Ant Colony Optimization implemented.
Written time:
Last modify time: December 26, 2012


字段摘要
修饰符 和 类型 字段 和 描述
(专用软件包)  double a
          The exponent of pheromone.
(专用软件包)  double[] accumulateProbabilityArray
          Accumulative probability
(专用软件包)  boolean alive
          The working state of ants.
(专用软件包)  int attributeNumber
          The number of conditions.
(专用软件包)  double b
          The exponent of the test cost of attributes.
(专用软件包)  boolean[] candidateAttribute
          The set of candidate attributes.
(专用软件包)  int cur
          The cursor of the array visitedFeaturesSquence
(专用软件包)  int currentPosition
          The current position of this ant
(专用软件包)  double[][] pheromoneMatrix
          Pheromone array
(专用软件包)  java.util.Random ran
          Generate random numbers
(专用软件包)  boolean[] selectedFeatures
          The set of selected features
(专用软件包)  double[] selectingProbabilityArray
          The probability of each adjacent feature(vertex) from the view of current feature.
(专用软件包)  int[] testcost
          The array of each attribute's test cost.
(专用软件包)  int[] visitedFeaturesSquence
          The features sequence which the ant visited.
 
构造方法摘要
构造函数 和 描述
Ant(int paraAttributeNumber, double[][] paraPheromoneMatrix, int[] paraTestcost)
          Construct Method 1
Ant(int paraAttributeNumber, double paraA, double paraB, double[][] paraPheromoneMatrix, int[] paraTestcost)
          Construct Method 2
Ant(int paraAttributeNumber, double paraA, double paraB, double[][] paraPheromoneMatrix, int[] paraTestcost, boolean[] core)
          Construct Method 3
 
方法摘要
修饰符 和 类型 方法 和 描述
 void antStop()
          Stop the ant's work
 void chooseNextAttribute()
          Artificial ants make decisions.
 void initialize()
          Initialize
 void output()
          Output the sequence of attributes and the total test cost.
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

alive

boolean alive
The working state of ants.


currentPosition

int currentPosition
The current position of this ant


attributeNumber

int attributeNumber
The number of conditions.


selectedFeatures

boolean[] selectedFeatures
The set of selected features


visitedFeaturesSquence

int[] visitedFeaturesSquence
The features sequence which the ant visited.


candidateAttribute

boolean[] candidateAttribute
The set of candidate attributes.


testcost

int[] testcost
The array of each attribute's test cost.


a

double a
The exponent of pheromone.


ran

java.util.Random ran
Generate random numbers


b

double b
The exponent of the test cost of attributes.


selectingProbabilityArray

double[] selectingProbabilityArray
The probability of each adjacent feature(vertex) from the view of current feature. Except visited features.


accumulateProbabilityArray

double[] accumulateProbabilityArray
Accumulative probability


pheromoneMatrix

double[][] pheromoneMatrix
Pheromone array


cur

int cur
The cursor of the array visitedFeaturesSquence

构造方法详细信息

Ant

public Ant(int paraAttributeNumber,
           double[][] paraPheromoneMatrix,
           int[] paraTestcost)
Construct Method 1


Ant

public Ant(int paraAttributeNumber,
           double paraA,
           double paraB,
           double[][] paraPheromoneMatrix,
           int[] paraTestcost)
Construct Method 2


Ant

public Ant(int paraAttributeNumber,
           double paraA,
           double paraB,
           double[][] paraPheromoneMatrix,
           int[] paraTestcost,
           boolean[] core)
Construct Method 3

方法详细信息

initialize

public void initialize()
Initialize


chooseNextAttribute

public void chooseNextAttribute()
Artificial ants make decisions.


antStop

public void antStop()
Stop the ant's work


output

public void output()
Output the sequence of attributes and the total test cost.