51
Dev开发社区
首页
文章
问答
工具
搜索
登录
注册
#NUM
HDU 1394 Minimum Inversion Number(线段树求最小逆序数对)
...
代码星球
·
2020-08-20
HDU
1394
Minimum
Inversion
Number
mysql中set和enum使用(简单介绍)
在创建表时,就指定SET类型的取值范围。属性名SET('值1','值2','值3'...,'值n') 其中,“属性名”参数指字段的名称;“值n”参数表示列表中的第n个值,这些值末尾的空格将会被系统直接删除。其基本形式与ENUM类型一样。SET类型的值可以取列表中的一...
代码星球
·
2020-08-19
mysql
set
enum
使用
简单
java 枚举类型enum
Java 中的枚举类型采用关键字enum 来定义,从jdk1.5才有的新类型,所有的枚举类型都是继承自Enum 类型。要了解枚举类型,建议大家先打开jdk 中的Enum 类简单读一下,这个类里面定义了很多protected 方法,比如构造函数,如果要使用这些方...
代码星球
·
2020-08-19
java
枚举
类型
enum
java反射 反射构造函数 报 wrong number of arguments 错误
packagecom;importjava.lang.reflect.Constructor;publicclassPerson{publicPerson(){}publicPerson(Stringname){this.name=name;}publicPerson(intage){this.age=age;}pub...
代码星球
·
2020-08-19
反射
java
构造
函数
wrong
Java Enum 枚举类的values方法
Enum类和enum关键字定义的类型都有values方法,但是点进去会发现找不到这个方法。这是因为java编译器在编译这个类(enum关键字定义的类默认继承java.lang.Enum)的时候自动插入了一条static的方法values。在官方文档中有说明。文档地址:https://docs.oracle.com/ja...
代码星球
·
2020-08-16
Java
Enum
枚举
values
方法
几种查询方法(lambda Linq Enumerable静态类方式)
1.需要一个数据源类:usingSystem;usingSystem.Collections.Generic;namespaceLinq{publicclassStudent{publicintId{get;set;}publicstringName{get;set;}publicintAge{get;set;}}pu...
代码星球
·
2020-08-15
几种
查询
方法
lambda
Linq
numpy.linalg.eig
1、转置对于二维数组有用,对一位数组无效2、理解特征值和特征向量的对应关系a=np.array([[1,2,3],[4,5,6],[7,8,9]])aOut[27]:array([[1,2,3],[4,5,6],[7,8,9]])w,v=LA.eig(a)wOut[29]:array([1.61168440e+01,-...
代码星球
·
2020-08-15
numpy.linalg.eig
numpy.concatenate
importnumpyasnpa=np.array([[1,2],[3,4]])a.shapeOut[3]:(2,2)b=np.array([[5,6]])b.shapeOut[5]:(1,2)np.concatenate((a,b))Out[6]:array([[1,2],[3,4],[5,6]])c=np.conc...
代码星球
·
2020-08-15
numpy.concatenate
numpy.percentile
http://docs.scipy.org/doc/numpy/reference/generated/numpy.percentile.htmlnumpy.percentile(a,q,axis=None,out=None,overwrite_input=False,interpolation='linear',ke...
代码星球
·
2020-08-15
numpy.percentile
numpy.matlib.randn(标准正态分布)
#网址http://docs.scipy.org/doc/numpy/reference/generated/numpy.matlib.randn.html#numpy.matlib.randnnumpy.matlib.randn(*args)[source]Returnarandommatrixwithdatafro...
代码星球
·
2020-08-15
numpy.matlib.randn
标准
正态分布
numpy.ones_like(a, dtype=None, order='K', subok=True)返回和原矩阵一样形状的1矩阵
Returnanarrayofoneswiththesameshapeandtypeasagivenarray.Parameters:a :array_likeTheshapeanddata-typeof a definethesesameattributesofthereturnedar...
代码星球
·
2020-08-15
矩阵
numpy.ones
like
dtype
None
numpy.zeros(shape, dtype=float, order='C')
Returnanewarrayofgivenshapeandtype,filledwithzeros.Parameters:shape :intorsequenceofintsShapeofthenewarray,e.g., (2, 3) or 2.dtype ...
代码星球
·
2020-08-15
numpy.zeros
shape
dtype
float
order
numpy.ones(shape, dtype=None, order='C')
Returnanewarrayofgivenshapeandtype,filledwithones.Parameters:shape :intorsequenceofintsShapeofthenewarray,e.g., (2, 3) or 2.dtype...
代码星球
·
2020-08-15
numpy.ones
shape
dtype
None
order
numpy.mean和numpy.random.multivariate_normal(依据均值和协方差生成数据,提醒:计算协方差别忘了转置)
>>importnumpyasnp>>>A1_mean=[1,1]>>>A1_cov=[[2,.99],[1,1]]>>>A1=np.random.multivariate_normal(A1_mean,A1_cov,10)#依据指定的均值和协方差生成数...
代码星球
·
2020-08-15
numpy.mean
numpy.random.multivariate
normal
依据
均值
numpy和matlab计算协方差矩阵的不同(matlab是标准的,numpy相当于转置后计算)
matlab是标准的,numpy相当于转置后计算>>x=[2,0,-1.4;2.2,0.2,-1.5;2.4,0.1,-1;1.9,0,-1.2]x=2.0000 0 -1.40002.2000  ...
代码星球
·
2020-08-15
numpy
matlab
计算
方差
矩阵
首页
上一页
...
351
352
353
354
355
...
下一页
尾页
按字母分类:
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
其他