![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
math
qq379548839
这个作者很懒,什么都没留下…
展开
-
【数值计算】幂法与反幂法
幂法求矩阵模最大的特征值及其对应特征向量 注:需要模最大特征值唯一,矩阵各列线性无关// 幂法求特征值// 需要保证各列线性无关#include <iostream>#include <cmath>#include <cstdlib>#include <cstring>#include <iomanip>using namespace std;#define N 5class MT {原创 2016-10-17 21:49:39 · 11516 阅读 · 1 评论 -
【数值计算】householder矩阵的QR算法,求特征值
#include <iostream>#include <cstdio>#include <cmath>#include <cstring>#include <cstdlib>#define N 10using namespace std;class MT {public: int x, y; double mt[N][N]; MT() {} MT(int x原创 2016-11-02 23:41:15 · 4329 阅读 · 0 评论 -
Leetcode 415. Add Strings[easy]
题目: Given two non-negative numbers num1 and num2 represented as string, return the sum of num1 and num2.Note:The length of both num1 and num2 is < 5100. Both num1 and num2 contains only digits 0-9.原创 2016-10-14 10:13:46 · 219 阅读 · 0 评论 -
Leetcode 372. Super Pow[medium]
题目: Your task is to calculate ab mod 1337 where a is a positive integer and b is an extremely large positive integer given in the form of an array.Example1:a = 2 b = [3]Result: 8 Example2:a = 2 b =原创 2016-10-14 17:13:23 · 287 阅读 · 0 评论 -
Leetcode 397. Integer Replacement[medium]
题目: Given a positive integer n and you can do operations as follow:If n is even, replace n with n/2. If n is odd, you can replace n with either n + 1 or n - 1. What is the minimum number of replacem原创 2016-10-14 16:49:00 · 232 阅读 · 0 评论 -
Leetcode 365. Water and Jug Problem[medium]
题目: You are given two jugs with capacities x and y litres. There is an infinite amount of water supply available. You need to determine whether it is possible to measure exactly z litres using these t原创 2016-10-26 19:01:05 · 277 阅读 · 0 评论