iregular2dmatrix.java

来自「用于求解TSP(Traveling salesman problem」· Java 代码 · 共 25 行

JAVA
25
字号
/**
 * Description: provide the information for an regular 2D matrix
 *
 * @ Author        Create/Modi     Note
 * Xiaofeng Xie    Dec 12, 2005
 */

package Global.basic.data.matrix;

public class IRegular2DMatrix extends IIrregular2DMatrix implements IRegularNumberEngine {
  public IRegular2DMatrix(int row, int col) {
    super(new int[row][col]);
  }

  public int getElementNumber() {
    if (this.getNodeNumber() == 0) {
      return 0;
    }
    else {
      return dataMatrix[0].length;
    }
  }

}

⌨️ 快捷键说明

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