24小时热门版块排行榜    

查看: 2544  |  回复: 10
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖

astringent

铜虫 (著名写手)

[交流] 【求助】msd算法 已有6人参与

写了一个计算均方位移的程序,可是由于程序中用了很多大的数组,程序总是提示出错,老板让用on the fly算法,请问何为on the fly算法?请大家不吝赐教多谢
回复此楼
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

1dubo

银虫 (小有名气)

on the fly

★ ★
zh1987hs(金币+2): 谢谢 2011-02-18 22:47:51
A computer can compute results on the fly, or retrieve a previously stored result.

It can mean to make a copy of a removable media (CD-ROM, DVD, etc.) directly, without first saving the source on an intermediate medium (a harddisk); for example, copying a CD-ROM from a CD-ROM drive to a CD-Writer drive.

When used for encrypted data storage, on the fly the data stream is automatically encrypted as it is written and decrypted when read back again, transparently to software. The acronym OTFE is typically used.

On-the-fly programming is the technique of modifying a program without stopping it.

小子的理解:
读出数据后立即处理,不要存在中间媒介(数组,链表之类的),而是读出后直接处理了就输出。
over
9楼2011-02-16 13:39:04
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
查看全部 11 个回答

yahoohoo

铁杆木虫 (著名写手)

★ ★
小木虫(金币+0.5):给个红包,谢谢回帖交流
ghcacj(金币+1): 谢谢 2011-02-05 20:45:23
引用回帖:
Originally posted by astringent at 2011-02-04 04:35:52:
写了一个计算均方位移的程序,可是由于程序中用了很多大的数组,程序总是提示出错,老板让用on the fly算法,请问何为on the fly算法?请大家不吝赐教多谢

为何不将坐标输出到文件,然后进行后续的计算呢
2楼2011-02-05 00:03:10
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

astringent

铜虫 (著名写手)


zh1987hs(金币+1): 鼓励交流 2011-02-09 21:18:31
引用回帖:
Originally posted by yahoohoo at 2011-02-05 00:03:10:


为何不将坐标输出到文件,然后进行后续的计算呢

我试试,多谢。
另外我还有个问题,我要对体系中某些原子计算MSD,但是由于在每个时间原点t=0时,这些原子的个数不固定,我在累加msd时可以做到只对符合条件原子的msd进行累加,但是最后求平均用公式MSD(t)=MSD(t)/nparticle*ntime0时,就出现问题了,粒子数nparticle应该怎么办呢?因为在每个时间原点时,nparticle不一样啊?
3楼2011-02-05 05:48:05
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

老虎大王

木虫 (著名写手)

★ ★ ★ ★
小木虫(金币+0.5):给个红包,谢谢回帖交流
zh1987hs(金币+3): 谢谢 2011-02-09 21:18:41
每次都对粒子数求平均就行了。
4楼2011-02-06 17:56:33
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
普通表情 高级回复 (可上传附件)
信息提示
请填处理意见