bernoulliconstanttest.java

来自「一个自然语言处理的Java开源工具包。LingPipe目前已有很丰富的功能」· Java 代码 · 共 32 行

JAVA
32
字号
package com.aliasi.test.unit.stats;import com.aliasi.stats.BernoulliConstant;import com.aliasi.test.unit.BaseTestCase;import java.io.*;public class BernoulliConstantTest extends BaseTestCase {    public void testOne() throws IOException, ClassNotFoundException {    BernoulliConstant coin = new BernoulliConstant(0.5);    BernoulliEstimatorTest.assertFairCoin(coin);    try {        new BernoulliConstant(1.2);        fail();    } catch (IllegalArgumentException e) {        assertTrue(true);    }    try {        new BernoulliConstant(-1.2);        fail();    } catch (IllegalArgumentException e) {        assertTrue(true);    }    }}

⌨️ 快捷键说明

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