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

📄 doublematrix.java

📁 一个利用条件随机场(CRF)开发的词性标注工具包
💻 JAVA
字号:
/*    Copyright (C) 2006, Xuan-Hieu Phan        Email:	hieuxuan@ecei.tohoku.ac.jp		pxhieu@gmail.com    URL:	http://www.hori.ecei.tohoku.ac.jp/~hieuxuan        Graduate School of Information Sciences,    Tohoku University*/package crf.tagger;public class DoubleMatrix {    public double[][] mtrx = null;    public int rows = 0;    public int cols = 0;        public DoubleMatrix() {    }        public DoubleMatrix(int rows, int cols) {	this.rows = rows;	this.cols = cols;	mtrx = new double[rows][cols];    }        public DoubleMatrix(int rows, int cols, double[][] mtrx) {	this.rows = rows;	this.cols = cols;		this.mtrx = new double[rows][cols];    }        public DoubleMatrix(DoubleMatrix dm) {	rows = dm.rows;	cols = dm.cols;		mtrx = new double[rows][cols];		for (int i = 0; i < rows; i++) {	    for (int j = 0; j < cols; j++) {		mtrx[i][j] = dm.mtrx[i][j];	    }	}    }        public void assign(double val) {	for (int i = 0; i < rows; i++) {	    for (int j = 0; j < cols; j++) {		mtrx[i][j] = val;	    }	}    }        public void assign(DoubleMatrix dm) {	for (int i = 0; i < rows; i++) {	    for (int j = 0; j < cols; j++) {		mtrx[i][j] = dm.mtrx[i][j];	    }	}    }        } // end of class DoubleMatrix

⌨️ 快捷键说明

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