摘要:
3种方式: import numpy import pandas #方式1:列表推导(list comprehension) b=[[0]*3 for i in range(4)] a = [b[i][j] for i in range(3) for j in range(2)] #删除列表中空字符 阅读全文
posted @ 2021-07-27 09:58
cxc1357
阅读(365)
评论(0)
推荐(0)
摘要:
贝叶斯公式: 虚位移定理求超静定结构位移: 外力虚功 = 力1 x 位移1 = 力2 x 位移2 = 变形虚功 两个状态量的组合,具有一致的不严格性 参考: https://blog.csdn.net/qq_23947237/article/details/78265026 阅读全文
posted @ 2021-07-27 09:57
cxc1357
阅读(193)
评论(0)
推荐(0)
摘要:
高斯消元法可用于求解n元1次方程组 伪代码: def gauss(): for i = 1 to n-1: for j = i+1 to n: c = -a[j][i]/a[i][i] for k = 1 to n: a[j][k] += a[i][k]*c b[j]+=b[i]*c x[n]=b[ 阅读全文
posted @ 2021-07-27 09:53
cxc1357
阅读(1791)
评论(0)
推荐(0)
摘要:
冒泡排序 思路:依次比较相邻两个元素的大小,不满足大小关系则交换,每次循环都将最大的数置于数组末尾 实现:双循环,单指针;若一个循环中没有发生交换,提前退出 伪码: n = len(a) for i = 1 to n-1 for j = 0 to n-i-1 if a[j]>a[j+1] swap( 阅读全文
posted @ 2021-07-27 09:53
cxc1357
阅读(63)
评论(0)
推荐(0)
摘要:
分为3个函数实现: sort():主排序函数 _sort():分治函数,将排序数组不断分解为子数组进行排序 _merge():归并函数,将两个有序数组合并成一个大的有序数组 1 def sort(a): 2 n = len(a) 3 aux = [0]*n 4 return _sort(a,0,n, 阅读全文
posted @ 2021-07-27 09:52
cxc1357
阅读(149)
评论(0)
推荐(0)
摘要:
参考: https://blog.csdn.net/kxcfzyk/article/details/38613861 阅读全文
posted @ 2021-07-27 09:42
cxc1357
阅读(28)
评论(0)
推荐(0)

浙公网安备 33010602011771号