文章列表
 
您正在查看 "计算数学" 分类下的文章

2010-04-29 17:53

http://www.dotnumerics.com/NumericalLibraries/DifferentialEquations/

DotNumerics contains classes for initial-value problem for nonstiff and stiff ordinary differential equations ODEs.

dy(i)/dt = f(i,t,y(1),y(2),...,y(N))
  • Adams-Moulton. Solves an initial-va
 
2010-04-29 17:12
/*
* 向前Euler法
*
* 求下面一阶初值问题的近似解
* Y' = F(X,Y), A<=X<=B, Y(A) = ALPHA,
* 把求解区间等分成N等分,
* 这样就得到 N+1 点 X_{n}=A+h*n, n=0,1,...n
* 其中 h = (B-A)/N.
*
* INPUT: 端点 A,B; 初始值 ALPHA; 整数 N.
*
* OUTPUT: Y(X_n) 的近似解 Y_n .
* Tiao Lu, tlu@math.pku.edu.cn, Peking University
* 参考了: ALG051.C
*
*/

#include<iostream>
#include
 
2007-12-21 23:34

Fibonacci数列的计算
点击数:3454     发布日期:2006-11-6 17:43:00  
 
2007-12-20 17:19
增加了记录路径的功能,修正了 lessnode定义的错误。
/*
* =====================================================================================
*
*       Filename: dfs2.cpp
*
*    Description: 深度优先搜索算法, 记录从start_node 到 goal_node 的路径
*
*        Version: 2.0
*        Created: 2007年12月19日 22时52分26秒 CST
 
2007-12-20 15:57
在定义 lessnode 的时候有错误,可能造成死循环,不过就目前这个例子计算反倒比没有错误的快。
后面的例子给出的 lessnode 定义没有错误。
就对目前这个例子,错误的lessnode 定义经过 2272 步 得到结果
正确的 lessnode 定义的程序经过 39268 不得到结果, 计算时间也长很多。
/*
* =====================================================================================
*
*       Filename: dfs1.cpp
*
*    Description: 深度优先搜索
 
2007-12-19 23:38
/*
* =====================================================================================
*
*       Filename: dfs.cpp
*
*    Description: 深度优先搜索算法
*
*        Version: 1.0
*        Created: 2007年12月19日 22时52分26秒 CST
*       Revision: none
*       C
 
2007-12-19 22:23
Sorting - The most fundamental thing in algorithms, and it's almost a given. (And it means the same in English as it does in Math, so no explanations needed, I hope.) There are tons of crazy sorts out there, but quick sort is the one everyone should be familiar with,
 
2007-12-17 16:16
breadth-first search algorithm (bfs) 的简单实现。
没有检测是不是两个state是重复的,很多情况下要耗很多的内存和时间。

/*
* =====================================================================================
*
*       Filename: 8puzzle.c
*
CS3361 Spring 1996
Introduction to Artificial Intelligence
Example 1: A C program to do the 8 Puzzle.

Missing Features

    * Correct Output Format.
 
2007-11-29 20:07

浮点数在不同的机器上有不同的实现方式,下面主要讲述是的IEEE标准 (1985) 的二进制浮点数表示:

IEEE754标准在表示浮点数时,每个浮点数均由三部分组成:符号位S (sign),指数部分E (exponent) 和尾数部分M (mantissa)。

浮点数一般采用以下四种基本格式:

(1)单精度格式(32位):除去符号位1位后,E占8位,M占23位。

(2)
 
2007-11-14 15:32

翻译自http://www.wam.umd.edu/~petersd/fort90intr/node1.html

Fotran90 与 Fotran 77 的关系就像 C++ 和 C, fotran 77 的代码使用 Fortran90的编译器可以编译。Fortan 90 比 Fortan 77 多了很多功能,如动态分配内存, array processing features, structured data types, modules and pointers. 有些Fortran 77的命令不再支持,如 (GOTO, COMMON).

 
   
 
 
文章存档
 
     
 
最新文章评论
  

这样做是不是只能转化为utf8不能搞成gbk啊? 好像用iconv可以任意转换
 

求问:如何向vector中的指定位置中插入数据???
 

最近在用,学习了
 

学习了
 

//并行输出往往次序是混乱的,为了按顺序输出,我们采用下面这段代码 //输出代码将会
   
帮助中心 | 空间客服 | 投诉中心 | 空间协议
©2012 Baidu