![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Java数学计算
胖子雷神
这个作者很懒,什么都没留下…
展开
-
进制转换
1、十进制转换二进制工具类及工具方法 /** * */ package leo.util.math; /** * @author leorain * 数字处理工具类 */ public class NumHandler { /** * 十进制转二进制 * @param decimal * 10/2 = 5 .... 0 * 5/2 = 2 .... 1 *原创 2015-01-07 21:51:40 · 606 阅读 · 0 评论 -
自然数转换为二维矩阵可用于笛卡尔乘积型数据进行内存分页
@Test public void testNaturalTraslateMatrix(){ int row = 7; int column = 8; int total = row * column; String[] rowStrList = new String[row]; for (int k = 0;原创 2016-04-12 17:11:25 · 509 阅读 · 0 评论 -
非递归方式线性结构转换为树型结构(zTree核心)
import java.util.List; /** * Created by XZG1573623031 on 16-3-24. */ public class Node { /** * 当前节点 */ private String id; /** * 当前名称 */ private String nm;原创 2016-04-12 18:44:27 · 709 阅读 · 0 评论 -
多线程执行任务等待所有任务执行完毕
@Test public void testMultiThread(){ try { final CountDownLatch countDownLatch = new CountDownLatch(2);//计数器 ExecutorService executorService = Executors.newCachedTh原创 2016-04-13 14:40:35 · 1995 阅读 · 0 评论