自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(10)
  • 收藏
  • 关注

原创 两个向量(数组)点对点相加(Java)

两个向量(数组)点对点相加(Java)public class CMatrix { private CMatrix() {} /** * addition of two vectors. * * @param x one vector * @param y another vector * @return result vecto...

2018-04-09 00:47:29 3441

原创 根据整型数组统计该数组所有整型元素出现的频率(当数组长度足够时即可近似得到概率)

根据整型数组统计该数组所有整型元素出现的频率(当数组长度足够时即可近似得到概率)import java.util.HashMap;import java.util.Map;import java.util.Set;public class CProbability { private CProbability() {} public static Map<Integ...

2018-04-09 00:40:56 327

原创 翻转(逆序重排列)数组元素(Java)

翻转(逆序重排列)数组元素(Java)public class CArrays { private CArrays() {} /** * Reverse the object array. * * @param arr object array * @param <T> object type * @return th...

2018-04-09 00:37:01 846

原创 求一个整数的二进制表示法(Java)

求一个整数的二进制表示法(Java)public class CInteger { private CInteger() {} /** * Convert decimal integer to binary string * * @param n decimal integer * @return binary string */...

2018-04-09 00:34:08 4034

原创 数组二分查找法(Java)

数组二分查找法(Java)public class CSearch { /** * Use binary search method to find specific element from an array. * * @param key specific element * @param arr array * @return if...

2018-04-09 00:32:22 474

原创 根据数组数据源统计出量化级数为m的直方图数组

根据数组数据源统计出量化级数为m的直方图数组public class CMath { private CMath() {} /** * Statistical histogram. * * @param arr value array * @param m quantization level * @return histogra...

2018-04-09 00:30:19 293

原创 求二项分布的n次试验k次成功的具体概率

求二项分布的n次试验k次成功的具体概率public class CMath { private CMath() {} /** * Compute binomial distribution probability. * * @param n Total number of experiments * @param k Total numbe...

2018-04-09 00:28:42 4045

原创 求一个浮点数的平方根——牛顿迭代法

求一个浮点数的平方根——牛顿迭代法public class CMath { private CMath() {} /** * Calculate the square root of a double floating-point number. * * @param d the double floating-point number *...

2018-04-09 00:25:17 2594

原创 求一个整数是否为素数(质数)

求一个整数是否为素数(质数)public class CMath { private CMath() {} /** * Determine whether an integer is a prime. * * @param n the integer * @return result */ public static bo...

2018-04-09 00:22:38 445

原创 求两个非负整数的最大公约数——欧几里得算法

求两个非负整数的最大公约数——欧几里得算法public class CMath { private CMath() { } /** * Calculate the maximum common divisor of two nonnegative integers. * * @param p A nonnegative integer ...

2018-04-09 00:18:29 1234

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除