搜档网
当前位置:搜档网 › BEAST软件计算分化时间

BEAST软件计算分化时间

BEAST软件计算分化时间
BEAST软件计算分化时间

Relaxed Phylogenetics and Dating with Con?dence

Alexei J Drummond and Andrew Rambaut

April 1,2010

Introduction

This practical will introduce the BEAST software for Bayesian evolutionary analysis,with a focus on estimating phylogenies and divergence

times when you have calibration information from fossil evidence or other prior knowledge.You will need the following software at your disposal:?BEAST -this package contains the BEAST program,BEAUti,TreeAnnotator and other utility programs.This tutorial is written for BEAST v1.5.x,which has support for multiple partitions.It is available for download from https://www.sodocs.net/doc/cf15659409.html,/.

?Tracer -this program is used to explore the output of BEAST (and other Bayesian MCMC programs).It graphically and quantitively summarizes the dis-tributions of continuous parameters and provides diagnostic information.At the time of writing,the current version is v1.5..It is available for download from https://www.sodocs.net/doc/cf15659409.html,/.

?FigTree -this is an application for displaying and printing molecular phylogenies,in particular those obtained using BEAST.At the time of writing,the current version is v1.3.1.It is available for download from https://www.sodocs.net/doc/cf15659409.html,/.

Rates and dates

This tutorial will guide you through the analysis of an alignment of sequences sampled from twelve primate species.The goal is to estimate the phylogeny as well as the rate of evolution on each lineage based on dates of divergence of their host species.

The ?rst step will be to convert a NEXUS ?le with a DATA or CHARACTERS into a BEAST XML input ?le.This is done using the program BEAUti (this stands for Bayesian Evolutionary Analysis Utility).This is a user-friendly for setting the evolutionary model and options for the MCMC analysis.The second step is to actually run BEAST using the input ?le that contains the data,model and settings.

n. 刻度;校准;标度

The?nal step is to explore the output of BEAST in order to diagnose problems and to summarize the results.

BEAUti

The program BEAUti is a user-friendly program for setting the model parameters for BEAST.Run BEAUti by double clicking on its icon.

Loading the NEXUS?le

To load a NEXUS format alignment,simply select the Import Alignment...option from the File menu:

Select the?le called primates.nex.This?le contains an alignment of sequences of

this(the lines have been truncated):

gap=-;

matrix

Tarsius_syrichta AAGTTTCATTGGAGCCACCACTCTTATAATTGCCCATGGCCTCACC

Lemur_catta AAGCTTCATAGGAGCAACCATTCTAATAATCGCACATGGCCTTACA

Homo_sapiens AAGCTTCACCGGCGCAGTCATTCTCATAATCGCCCACGGGCTTACA

Pan AAGCTTCACCGGCGCAATTATCCTCATAATCGCCCACGGACTTACA

Gorilla AAGCTTCACCGGCGCAGTTGTTCTTATAATTGCCCACGGACTTACA

Pongo AAGCTTCACCGGCGCAACCACCCTCATGATTGCCCATGGACTCACA Hylobates AAGCTTTACAGGTGCAACCGTCCTCATAATCGCCCACGGACTAACC Macaca_fuscata AAGCTTTTCCGGCGCAACCATCCTTATGATCGCTCACGGACTCACC

M_mulatta AAGCTTTTCTGGCGCAACCATCCTCATGATTGCTCACGGACTCACC

M_fascicularis AAGCTTCTCCGGCGCAACCACCCTTATAATCGCCCACGGGCTCACC

M_sylvanus AAGCTTCTCCGGTGCAACTATCCTTATAGTTGCCCATGGACTCACC

Saimiri_sciureus AAGCTTCACCGGCGCAATGATCCTAATAATCGCTCACGGGTTTACT

;

end;

begin assumptions;

charset firsthalf

charset secondhalf=450-898;

end;

end;

Once loaded,the two character partitions are displayed in the main panel:

De?ning the calibration nodes

Select the Taxon Sets tab at the top of the main window.You will see the panel that allows you to create sets of taxa.Once you have created a taxa set you will be able to add calibration information for its most recent common ancestor(MRCA)later on. Press the small“plus”button at the bottom left of the panel.This will create a new taxon set.

Rename it by double-clicking on the entry that appears(it will initially be called untitled1).Call it ingroup(it will contain all taxa except the lemur,which will form the outgroup).In the next table along you will see the available taxa.Select all taxa and press the green arrow button.Move the lemur back into the excluded taxa set.Since we know that lemur is the outgroup,we will set select the checkbox in the Monophyletic?column.This will ensure that the ingroup is kept monophyletic during the course of the MCMC analysis.

Now repeat the whole procedure creating a set called Human-Chimp that contains only Homo sapiens and Pan taxa.The screen should look like this:

Finally,create a taxon group that contains everything under the hominoid/cercopithecoid split(i.e.everything except Lemur,Saimiri and Tarsius).Call this taxon set something

like HomiCerco.

Setting the substitution model

The next thing to do is to click on the Site Models tab at the top of the main window.This will reveal the evolutionary model settings for BEAST.Exactly which options appear depend on whether the data are nucleotides,or amino acids,or binary data,or general data.The settings that will appear after loading the Primates data set

will be the default values so we need to make some changes.

Most of the models should be familiar to you.For this analysis,we will respectively select substitution models listed each time on the left side make the same change:select Gamma under the Site Heterogeneity Model menu which will allow rate variation between sites in the associated alignment.

At this point we will need to unlink the substitution model so that each parameter is estimated separately for the two partitions.To do this return to Data Partitions panel,select both partitions in the table and click the“Unlink Subst Models”button.

And you can also change the partition model name in its respective panel(e.g. Clock Models panel),and make the?nal partitions as illustrated below:

Setting the clock model

Second,we will do is to click on the Clock Models tab at the top of the main window, and to change the molecular clock model to Relaxed Clock:Uncorrelated Log-normal so as to account for lineage-speci?c rate heterogeneity.Your model options should now look like this:

The Estimate check box is required to be checked,because we wish to estimate the clock rate(and in doing so the divergence times).But this will automatically checked,in this case,when we put a proper prior on tmcra statistics appeared in Priors panel.

Trees

The Trees tab allows priors to be speci?ed for each parameter in the model.The?rst thing to do is to specify that we wish to use the Yule model as the tree prior.This is a simple model of speciation that is generally more appropriate when considering

sequences from di?erent species.Select this from the Tree prior dropdown menu.

Priors

The Priors tab allows priors to be speci?ed for each parameter in the model.The?rst thing to do is to specify that we wish to use the Yule model as the tree prior.This is a simple model of speciation that is generally more appropriate when considering sequences from di?erent species.Select this from the Tree prior dropdown menu.

We now need to specify a prior distribution for some of the divergence times,based on our prior fossil knowledge.This is known as calibrating our tree.We will actu-ally use two calibrations in this analysis.Click on the button in the table next to tmrca(human-chimp):

A dialog box will appear allowing you to specify a prior for the MRCA of these

three species.Select the Normal distribution

We are going to assume a normal distribution centered at 6million years with a standard deviation of 0.5million years.This will give a central 95%range of about 5-7My.This corresponds to the consensus estimate of the date of the most recent common ancestor of humans and chimps.

Following the same procedure set a calibration of 24+/-0.5million (stdev)for the hominoid-cercopithecoid split.

Although we created a taxon set for the ingroup (tmrca(ingroup)in the prior table),we are not going to put an informative prior on this.We can then estimate this divergence time based on the other calibrations.The priors table should now look like this:

Setting the MCMC options

Ignore the Operators tab as this just contains technical settings e?ecting the e?ciency of the MCMC program(see Notes for details).

The next tab,MCMC,provides more general settings to control the length of the MCMC and the?le names.

Firstly we have the Length of chain.This is the number of steps the MCMC will make in the chain before?nishing.How long this should be depends on the size of the data set,the complexity of the model and the quality of answer required.The default value of10,000,000is entirely arbitrary and should be adjusted to the size of your data set.For this data set let’s initially set the chain length to800,000as this will run reasonably quickly on most modern computers(a few minutes).

The next options specify how often the parameter values in the Markov chain should be displayed on the screen and recorded in the log?le.The screen output is simply for monitoring the programs progress so can be set to any value(although if set too small, the sheer quantity of information being displayed on the screen will actually slow the program down).For the log?le,the value should be set relative to the total length of the chain.Sampling too often will result in very large?les with little extra bene?t in terms of the precision of the analysis.Sample too infrequently and the log?le will

not contain much information about the distributions of the parameters.You probably

want to aim to store no more than10,000samples so this should be set to no less than chain length/10,000.

For this exercise we will set the screen log to10000and the?le log to200.The ?nal two options give the?le names of the log?les for the sampled parameters and the trees.These will be set to a default based on the name of the imported NEXUS?le.

?If you are using windows then we suggest you add the su?x.txt to both of these (so,Primates.log.txt and Primates.trees.txt)so that Windows recognizes these as text?les.

Generating the BEAST XML?le

We are now ready to create the BEAST XML?le.To do this,either select the Gener-ate BEAST File...option from the File menu or click the similarly labelled button at the bottom of the window.Save the?le with an appropriate name(we usually end the?lename with.xml,i.e.,Primates.xml).We are now ready to run the?le through BEAST.

Running BEAST

Now run BEAST and when it asks for an input?le,provide your newly created XML ?le as input.

BEAST will then run until it has?nished reporting information to the screen.The actual results?les are save to the disk in the same location as your input?le.The output to the screen will look something like this:

BEAST v1.5.4,2002-2010

Bayesian Evolutionary Analysis Sampling Trees

Designed and developed by

Alexei J.Drummond,Andrew Rambaut and Marc A.Suchard

Department of Computer Science

University of Auckland

alexei@https://www.sodocs.net/doc/cf15659409.html,

Institute of Evolutionary Biology

University of Edinburgh

a.rambaut@https://www.sodocs.net/doc/cf15659409.html,

David Geffen School of Medicine

University of California,Los Angeles

msuchard@https://www.sodocs.net/doc/cf15659409.html,

Downloads,Help&Resources:

https://www.sodocs.net/doc/cf15659409.html,

Source code distributed under the GNU Lesser General Public License:

https://www.sodocs.net/doc/cf15659409.html,/p/beast-mcmc

BEAST developers:

Alex Alekseyenko,Erik Bloomquist,Joseph Heled,Sebastian Hoehna,

Philippe Lemey,Gerton Lunter,Sidney Markowitz,Vladimir Minin,

Michael Defoin Platel,Oliver Pybus,Walter Xie

Thanks to:

Roald Forsberg,Beth Shapiro and Korbinian Strimmer

Random number seed:1270078661254

Parsing XML file:primates.xml

File encoding:MacRoman

looking for plugins in/Users/dxie004/Desktop/Practical1a_RelaxedClocks_new/plugins

Unexpected element in coalescentTree:startingTree:tmrca in constrainedTaxa,tmrca in constrainedTaxa,tmrca in constrainedT Read alignment,’:alignment

Sequences=12

Sites=898

Datatype=nucleotide

Site patterns’firsthalf.patterns’created from positions1-449of alignment’alignment’

pattern count=227

Site patterns’secondhalf.patterns’created from positions450-898of alignment’alignment’

pattern count=231

Using Yule prior on tree

Creating the tree model,’treeModel’

initial tree topology=((((((((Homo_sapiens,M_sylvanus),Pongo),Pan),Tarsius_syrichta),Gorilla),Macaca_fuscata),((Hylobates tree height=163.55349753059264

Using discretized relaxed clock model.

over sampling=1

parametric model=logNormalDistributionModel

rate categories=22

Creating state frequencies model:Initial frequencies={0.25,0.25,0.25,0.25}

Creating HKY substitution model.Initial kappa=1.0

Creating state frequencies model:Initial frequencies={0.25,0.25,0.25,0.25}

Creating HKY substitution model.Initial kappa=1.0

Creating site model.

4category discrete gamma with initial shape=0.5

Creating site model.

4category discrete gamma with initial shape=0.5

TreeLikelihood(treeModel)using native nucleotide likelihood core

Ignoring ambiguities in tree likelihood.

With227unique site patterns.

Branch rate model used:discretizedBranchRates

TreeLikelihood(treeModel)using native nucleotide likelihood core

Ignoring ambiguities in tree likelihood.

With231unique site patterns.

Branch rate model used:discretizedBranchRates

Creating swap operator for parameter branchRates.categories(weight=10.0)

Likelihood is using-1threads.

Creating the MCMC chain:

chainLength=800000

autoOptimize=true

autoOptimize delayed for8000steps

#BEAST v1.5.4,Build r3085

#Generated Thu Apr0112:38:20NZDT2010[seed=1270078661254]

state Posterior Prior Likelihood rootHeight ucld.mean

0-17988.8851-5960.6020-12028.2831163.553 1.00000-

10000-6123.6529-54.5139-6069.139045.8562 2.06435E-2-

20000-5995.5266-58.6663-5936.860349.8866 1.52459E-20.15hours/million states

30000-5937.3075-57.7531-5879.554446.03979.70747E-30.11hours/million states

40000-5898.5427-55.7572-5842.785541.5696 1.23744E-20.1hours/million states

50000-5878.9464-56.3634-5822.583037.2131 1.04593E-20.09hours/million states

60000-5841.3595-57.0828-5784.276736.8985 1.25161E-20.09hours/million states

70000-5821.5282-58.6466-5762.881647.1654 1.1147E-20.08hours/million states

80000-5794.5158-58.5858-5735.930049.9805 1.16897E-20.08hours/million states

90000-5783.5819-57.4107-5726.171247.6737 1.4616E-20.08hours/million states

100000-5785.0143-59.4438-5725.570542.0940 1.77003E-20.08hours/million states

......

790000-5786.0332-63.5527-5722.480552.7075 1.32915E-20.07hours/million states

800000-5783.6441-62.1815-5721.462658.5455 1.23201E-20.07hours/million states

Operator analysis

Operator Tuning Count Time Time/Op Pr(accept)Performance suggestion scale(firsthalf.kappa)0.5417482450.330.2366good

firsthalf.frequencies0.056952510.360.295good

scale(firsthalf.alpha)0.5487032680.380.2731good

scale(secondhalf.kappa)0.5327392350.320.2896good

secondhalf.frequencies0.0527162560.360.3492good

scale(secondhalf.alpha)0.6226602350.360.3636good

scale(ucld.mean)0.6942120280480.380.274good

scale(ucld.stdev)0.6162146982040.380.584high Try setting scaleFact subtreeSlide(treeModel) 3.069106439216290.20.3145good

Narrow Exchange(treeModel)105884207350.20.0009very low

Wide Exchange(treeModel)2135123380.110.0002very low

wilsonBalding(treeModel)2152638360.180.0very low

scale(treeModel.rootHeight)0.7362113016630.080.1517good

uniform(nodeHeights(treeModel))213236494250.230.2091good

scale(yule.birthRate)0.2842138211680.050.2949good

up:ucld.mean down:nodeHeights(treeModel)0.8682137280790.380.219slightly high

Try setting scaleFactor to about0.8761

swapOperator(branchRates.categories)71045183850.260.4699slightly high

No suggestions

randomWalkInteger(branchRates.categories)70778153640.220.8972high Try increasing window uniformInteger(branchRates.categories)70925152440.210.5794high

3.3444minutes

Analyzing the results

Run the program called Tracer to analyze the output of BEAST.When the main

window has opened,choose Import Trace File...from the File menu and select the

?le that BEAST has created called Primates.log.txt.You should now see a window

like the following:

Remember that MCMC is a stochastic algorithm so the actual numbers will not be exactly the same.

On the left hand side is a list of the di?erent quantities that BEAST has logged. There are traces for the posterior(this is the log of the product of the tree likelihood and the prior probabilities),and the continuous parameters.Selecting a trace on the left brings up analyses for this trace on the right hand side depending on tab that is selected.When?rst opened,the‘posterior’trace is selected and various statistics of this trace are shown under the Estimates tab.In the top right of the window is a table of calculated statistics for the selected trace.

Select meanRate to look at the rate of evolution averaged over the whole tree.Tracer will plot a(marginal posterior)distribution for the selected parameter and also give you statistics such as the mean and median.The95%HPD stands for highest posterior density interval and represents the most compact interval on the selected parameter that contains95%of the posterior probability.It can be thought of as a Bayesian analog to a con?dence interval.

Questions

What is the rate of molecular evolution in Primates(include the HPD interval)?

What sources of error does this estimate include?

The coefficientOfVariation statistic gives a summary of how much the rate of evolution varies from lineage to lineage(expressed as a proportion of the mean rate).

Does the rate of evolution di?er substantially amongst di?erent lineages in the tree?

Selecting the treeModel.rootHeight parameter gives the marginal posterior dis-tribution of the age of the root of entire tree.

How old is the root of the tree(give the mean and the HPD range)?

Select the treeModel.rootHeight parameter and the next three(hold shift whilst selecting).This will show a display of the age of the root and the three MRCAs we speci?ed in BEAUti.The two parameters that we used to calibrate the tree (tmrca(HomiCerco)and tmrca(human-chimp))will have posterior distributions very similar to the prior distributions that we speci?ed.

If you switch the tab at the top of the window to Marginal Density then you will get a plot of the marginal posterior densities of each of these date estimates overlayed:

Obtaining an estimate of the phylogenetic tree

BEAST also produces a sample of plausible trees along with its sample of parameter estimates.These need to be summarized using the program TreeAnnotator (see Notes for details).This will take the set of trees and ?nd the best supported one.It will then annotate this summary tree with the mean ages of all the nodes and the HPD ranges.It will also calculate the posterior clade probability for each node.Run the TreeAnnotator program and set it up to look like this:

The burnin is the number of trees to remove from the start of the sample.Unlike Tracer which

speci?es the number of steps as a burnin,in TreeAnnotator you need to specify the actual number of trees.For this run,you speci?ed a chain length of 800,000steps sampling every 200steps.Thus the trees ?le will contain 4000trees and so to specify a 1%burnin use the value 40.

The probability limit option speci?es a limit such that if a is found at less than this frequency in the sample of trees (i.e.,has a probability less than this limit),it will not be annotated.The default of 0.5means that only nodes seen in the majority of trees will be annotated.Set this to zero to annotate all nodes.For Target tree type you can either choose a speci?c tree from a ?le or ask TreeAnnotator to ?nd a tree in your sample.The default option,Maximum clade credibility tree ,?nds the tree with the highest of the of all its nodes.

Choose Mean heights for node heights.This sets the heights (ages)of each node in the tree to the mean height across the entire sample of trees for that clade.

For the input ?le,select the trees ?le that BEAST created (by default this will be

called Primates.trees )and select a ?le for the output (here we called it Primates MCC.tree ).Now press Run and wait for the program to ?nish.

Viewing the Tree

Finally,we can look at the tree in another program called FigTree.Run this program, and open the Primates.MCC.tree?le by using the Open command in the File menu. The tree should appear.You can now try selecting some of the options in the control panel on the left.Try selecting Node Bars to get node age error bars.Also turn on Branch Labels and select posterior to get it to display the posterior probability for each node.Under Appearance you can also tell FigTree to colour the branches by the rate.You should end up with something like this:

Which branch has the fastest rate of evolution and what is the estimated rate?

Which branch has the slowest rate of evolution and what is the estimated rate?

Are these two rate estimates signi?cantly di?erent?How would you answer this question?

Comparing your results to the prior

Using BEAUti,set up the same analysis but under the MCMC options,select the Sample from prior only option.This will allow you to visualize the full prior distri-bution in the absence of your sequence data.Summarize the trees from the full prior distribution and compare the summary to the posterior summary tree.

皮克斯 软件相关

2008-01-07 19:00:44来自: ThinkEric(()&$%@$&^&^#&*&^*$%%^) 皮克斯公司简介 皮克斯公司官方网站:https://www.sodocs.net/doc/cf15659409.html,/ 皮克斯简史 1979年,皮克斯的前身,工业光魔的电脑图像工作室成立。 1984年,约翰·拉塞特加盟,创作自己的第一部3D短片《蜜蜂惊魂》(Andreand WallyB)。 1986年,卢卡斯电影公司的电脑图像工作室被苹果电脑ECO斯蒂芬·乔布斯以500万美元收购,正式命名为皮克斯工作室。 1987年,拉塞特的短片《台灯父子》(LuxoJr)获得奥斯卡最佳动画短片提名,作为皮克斯的第一部短片,它具有里程碑式的意义。 1989年,皮克斯自主开发的程序“渲染者”正式启用。动画短片《锡兵》(Tin Toy)赢得了奥斯卡最佳动画短片奖。 1991年,皮克斯与迪斯尼签约携手制作并发行三部动画长片。 1995年,皮克斯的第一部动画长片《玩具总动员》上映,这是影史上第一部完全由电脑制作完成的动画长片,也是当年北美票房冠军。 1997年,皮克斯与迪斯尼达成进一步协议,决定共同制作5部动画长片。 1998年,皮克斯第2部动画长片《昆虫总动员》上映,获得成功。《老人的游戏》获得奥斯卡最佳动画短片奖。 2001年,《怪物公司》上映后,成为影史上最快破亿的动画片。 2003年,《海底总动员》上映再创奇迹,在短短8天的时间内票房冲破1亿美元,刷新了《怪物公司》的票房神话。 2004年,皮克斯推出《超人特攻队》(TheInvincibles)。和迪斯尼签订新的协约。 2006年,迪斯尼以74亿美元天价买下皮克斯。推出动画长片《汽车总动员》。 总述Pixar动画制作室用赋有创造性的艺术技巧在计算机动画领域制作出了许多独特新颖的动画巨片。与合作伙伴Disney公司一起,Pixar公司已经制作出了4部倍受关注且获得巨大成功的动画影片:奥斯卡获

算法时间复杂度的计算

算法时间复杂度的计算 [整理] 基本的计算步骤 时间复杂度的定义 一般情况下,算法中基本操作重复执行的次数是问题规模n的某个函数,用T(n)表示,若有某个辅助函数f(n),使得当n趋近于无穷大时,T(n)/f(n)的极限值为不等于零的常数,则称f(n)是T(n)的同数量级函数。记作T(n)=O(f(n)),称O(f(n))为算法的渐进时间复杂度(O是数量级的符号 ),简称时间复杂度。 根据定义,可以归纳出基本的计算步骤 1. 计算出基本操作的执行次数T(n) 基本操作即算法中的每条语句(以;号作为分割),语句的执行次数也叫做语句的频度。在做算法分析时,一般默认为考虑最坏的情况。 2. 计算出T(n)的数量级 求T(n)的数量级,只要将T(n)进行如下一些操作: 忽略常量、低次幂和最高次幂的系数 令f(n)=T(n)的数量级。 3. 用大O来表示时间复杂度 当n趋近于无穷大时,如果lim(T(n)/f(n))的值为不等于0的常数,则称f(n)是T(n)的同数量级函数。记作T(n)=O(f(n))。 一个示例: (1) int num1, num2; (2) for(int i=0; i

beast系列软件使用

个人初步总结 第一步beauti软件设置nexw文件的参数最宕文件的格式是.xml 第二步mn bems嗽件最后的格式有」og帆t「ee 第三步trsica软件run设置第一步的参数的合理性 第2M^TreeAnnotator「un最后文件的格武是XX_MCC.tree 第五步FigTree playXX^MCC4ree r表现构建的结闵 个人详细使用: BEAUti 1、File- —Import Data —打开NEXUS(beauti软件的NEXUS文件与PAUP软件的有不同)文件打开后显示为 2、选择Taxon Sets通过建立一套定义子集分类,这个窗口允许你建立分类单元内的子集序列数据。这也允许你去记录每个分类tMRCA子集最近的共同祖先,设置分布在相应分歧时间的分歧倍。最后tMRCAs在日志文件中应按单位相同规定你的DNA序列。这些分类单元可以代 单元不保证该子集集团将能够对其它属种单源推理分析。 单击“ +”在左下角,创建几个分类群,重命名他们。在另一个中你可以看到一些有用的分 类群,选择你所需要的分类群然后单击绿色的按钮,确使在MCMC分析的时候保持单源。最后可以得到类似:

表不同的物种子集分析地理上孤立的多种群或者在一个物种。值得注意的是,建立一个分类 单元不保证该子集集团将能够对其它属种单源推理分析。 单击“ +”在左下角,创建几个分类群,重命名他们。在另一个中你可以看到一些有用的分 类群,选择你所需要的分类群然后单击绿色的按钮,确使在MCMC分析的时候保持单源。最后可以得到类似:

3、选择substituten model 这里主要是模型的选择 substitution model 中主要为三个模型HKY GTR TN9根据模型构建来选择Base frequencies 中Estimated/Emirical/AII equal 三种估计,经验,设备可根据不同的获得方式来选择。 Site Heteroge neity Model 中Non e/Gamma/I nv aria nt sites/Gamma+ Inv aria nt sites,None(假定物种的进化保持相同的速率)Gamma物种的进化不是相同的速率)Invariant sites (数据中的某些位点从未经受任何进化上的改变,其进化速率是相同的) Partition into codon positions 中off/2 partitions:positions(1+2),3/3 partiti on s:positi on s1,2,3 off :分析不能转录成RNA的DNA 2 partitions:positions(1+2),3:1,2 段转录比较慢,3段转录比较快 3 partitions:positions1,2,3 : 3段都有自己的转录翻译速度

算法的时间复杂性

算法的时间复杂度计算 定义:如果一个问题的规模是n,解这一问题的某一算法所需要的时间为T(n),它是n的某一函数 T(n)称为这一算法的“时间复杂性”。 当输入量n逐渐加大时,时间复杂性的极限情形称为算法的“渐近时间复杂性”。 我们常用大O表示法表示时间复杂性,注意它是某一个算法的时间复杂性。大O表示只是说有上界,由定义如果f(n)=O(n),那显然成立f(n)=O(n^2),它给你一个上界,但并不是上确界,但人们在表示的时候一般都习惯表示前者。 此外,一个问题本身也有它的复杂性,如果某个算法的复杂性到达了这个问题复杂性的下界,那就称这样的算法是最佳算法。 “大O记法”:在这种描述中使用的基本参数是 n,即问题实例的规模,把复杂性或运行时间表达为n的函数。这里的“O”表示量级 (order),比如说“二分检索是 O(logn)的”,也就是说它需要“通过logn量级的步骤去检索一个规模为n的数组”记法 O ( f(n) )表示当 n增大时,运行时间至多将以正比于 f(n)的速度增长。 这种渐进估计对算法的理论分析和大致比较是非常有价值的,但在实践中细节也可能造成差异。例如,一个低附加代价的O(n2)算法在n较小的情况下可能比一个高附加代价的 O(nlogn)算法运行得更快。当然,随着n足够大以后,具有较慢上升函数的算法必然工作得更快。 O(1) Temp=i;i=j;j=temp; 以上三条单个语句的频度均为1,该程序段的执行时间是一个与问题规模n无关的常数。算法的时间复杂度为常数阶,记作T(n)=O(1)。如果算法的执行时间不随着问题规模n的增加而增长,即使算法中有上千条语句,其执行时间也不过是一个较大的常数。此类算法的时间复杂度是O(1)。 O(n^2) 2.1. 交换i和j的内容 sum=0;(一次) for(i=1;i<=n;i++) (n次) for(j=1;j<=n;j++) (n^2次) sum++;(n^2次) 解:T(n)=2n^2+n+1 =O(n^2) 2.2. for (i=1;i

平均无故障时间MTBF测试及计算过程

一、寿命估算模型 常温下的故障及寿命的统计耗时耗力。为方便估算产品寿命,通常会进行批次性产品抽样,作加速寿命实验。 不同种类的产品,MTBF的计算方式也不尽相同,常用的加速模式有以下几种: 阿氏模型(Arrhenius Model):如果温度是产品唯一的加速因素,则可采用阿氏模型, 一般情況下,电子零件完全适用阿氏模型,而电子和通讯类成品也可适用阿氏模型,原因是成品类的失效模式是由大部分电子零件所构成.因此,阿氏模型,广泛用于电子与通讯行业。 爱玲模型(Eyring Model):如果引进温度以外的应力,如湿度,电压,机械应力等,则为爱玲模型。产品包括电灯,液晶显示元件,电容器等应用此模式。 反乘幂法则(Inverse Power Law):适用于金属和非金属材料,轴承和电子装备等。 复合模式(Combination Model):适用于同时考虑温度与电压作为环境应力的电子材料如电容。 二、常温下MTBF的估算方式 MTBF(Mean Time Between Failure),即平均失效间隔,指系统两次故障发生时间之间的时间段的平均值。 MTBF= 例子:从一批产品中抽取5PCS产品,在某一温度下,其实际工作时间、失效数如下图所示,求MTBF值。

解:带入公式计算 MTBF== ==131.8 二、MTBF阿氏模型 只有一项加速因子,如温度,且服从指数分布的加速寿命实验,可采用MTBF 阿氏模型计算公式进行估算。阿氏模型起源于瑞典物理化学家Svandte Arrhenius 1887年提出的阿氏反应方程式. R:反应速度speed of reaction A:溫度常数 a unknown non-thermal constant EA:活化能activation energy (eV) K:Boltzmann常数,等地8.623*10-5 eV/0K. T:为绝对溫度(Kelvin) Ea=(ln L2-ln L1)*k/(1/T2-1/T1) MTBF=L1*K Ea为活化能(eV); T1、T2为加速寿命测试的实验温度(需换算为绝对温度参与计算); T3为常温温度25℃,换算为绝对温度为298K; L1、L2分别为加速寿命测试温度T1、T2下测得的寿命; 寿命L= K为Boltzmann常数,值为8.62X (eV/K); 以同类型产品做参照,其计算过程如下:

切削加工常用计算公式

附录3:切削加工常用计算公式 1. 切削速度Vc (m/min) 1000n D Vc ?π?= 主轴转速n (r/min) D 1000 Vc n ?π?= 金属切除率Q (cm 3/min) Q = V c ×a p ×f 净功率P (KW) 3p 1060Kc f a Vc P ????= 每次纵走刀时间t (min) n f l t w ?= 以上公式中符号说明 D — 工件直径 (mm) ap — 背吃刀量(切削深度) (mm) f — 每转进给量 (mm/r ) lw — 工件长度 (mm)

铣削速度Vc (m/min) 1000n D Vc ?π?= 主轴转速n (r/min) D 1000 Vc n ?π?= 每齿进给量fz (mm) z n Vf fz ?= 工作台进给速度Vf (mm/min) z n fz Vf ??= 金属去除率Q (cm 3/min) 1000Vf ae ap Q ??= 净功率P (KW) 61060Kc Vf ae ap P ????= 扭矩M (Nm) n 10 30P M 3 ?π??= 以上公式中符号说明 D — 实际切削深度处的铣刀直径 (mm ) Z — 铣刀齿数 a p — 轴向切深 (mm) a e — 径向切深 (mm)

切削速度Vc (m/min) 1000n d Vc ?π?= 主轴转速n (r/min) d 1000 Vc n ?π?= 每转进给量f (mm/r) n Vf f = 进给速度Vf (mm/min) n f Vf ?= 金属切除率Q (cm 3/min) 4Vc f d Q ??= 净功率P (KW) 310240kc d Vc f P ????= 扭矩M (Nm) n 10 30P M 3?π??= 以上公式中符号说明: d — 钻头直径 (mm) kc1 — 为前角γo=0、切削厚度hm=1mm 、切削面积为1mm 2时所需的切 削力。 (N/mm 2) mc — 为切削厚度指数,表示切削厚度对切削力的影响程度,mc 值越 大表示切削厚度的变化对切削力的影响越大,反之,则越小 γo — 前角 (度)

常见系统发育软件使用

常见系统发育软件使用方法 Xie Lei BJFU 1 Paup MP流程: Mac 准备nex文件(interleave和noninterleave均可) →存入新建文件夹→拖入paup或用paup打开→ execute → log file → cstatus → tstatus → hsearch →define outgroup →roottrees →savetrees →describetrees →contree(save to file) →save pict→bootstrap(save tree file) →print bootstrap tree→save pict. →stop log. PC版操作,可将附录批处理文件内容粘贴至nex文件后面,execute即可。 2 Paup ML 流程:Mac 准备nex文件(interleave和noninterleave均可) →存入新建文件夹→拖入paup或用paup打开→execute→从modeltest软件中打开paupblock运算检测模型→生成score file→打开modeltest中的bin读取score数据→生成结果文档→存档并打开此文档→AIC→将begin paup的运算模块贴至原nex数据文件后面→重新将其拖入paup运行→选择ML运算模式→hsearch→打印树图→save pict. →bootstrap. PC版操作,可将附录5批处理文件内容粘贴至nex文件后面,execute即可。

3 Garli运算ML流程: 准备nex文件(interleave) →存入新建文件夹→拖入paup或用paup打开→execute→输出noninterleave文档(若直接是noninterleave上述过程省略,又如果是PC机paup,无菜单操作,可在paup命令行中输入附录1*的命令回车即可生成noninterleave数据)。 使用noninterleave文档(数据中类群名称不得有单引号,空格,所有方括号中内容删除)→新建文件夹存入→按照流程2进行modeltest→在苹果机上打开Garli→导入数据→把model定好→run(切记此处不要激bootstrap选项) 将上次运算数据拷贝至一新建文件夹→导入苹果版Garli→激活bootstrap选项→定好model→run 所有结果用paup软件打开→save pict→打开bootstrap树→做50% majority rule contree→save pict. 注:Garli苹果和PC版都有,但是操作不同。 数据格式:和算PAUP一样的nexus格式,但是这个格式有很多注意事项,一些常见的小错误会造成软件无法运行。参见下列常见问题: 1 一定要noninterleave的数据,否则软件无法运算 2 [ ]虽然在mrbayes和paup中不成问题但是在garli中有影响,里面内容在算之前全部删除为好。 3 taxon名称中可以有下划线但是不得有空格,逗号句点等,否则无法运行。 Mac版

最大公约数的三种算法复杂度分析时间计算

昆明理工大学信息工程与自动化学院学生实验报告 ( 2011 —2012 学年第 1 学期) 一、上机目的及内容 1.上机内容 求两个自然数m和n的最大公约数。 2.上机目的 (1)复习数据结构课程的相关知识,实现课程间的平滑过渡; (2)掌握并应用算法的数学分析和后验分析方法; (3)理解这样一个观点:不同的算法能够解决相同的问题,这些算法的解题思路不同,复杂程度不同,解题效率也不同。 二、实验原理及基本技术路线图(方框原理图或程序流程图) (1)至少设计出三个版本的求最大公约数算法; (2)对所设计的算法采用大O符号进行时间复杂性分析; (3)上机实现算法,并用计数法和计时法分别测算算法的运行时间; (4)通过分析对比,得出自己的结论。

三、所用仪器、材料(设备名称、型号、规格等或使用软件) 1台PC及VISUAL C++软件 四、实验方法、步骤(或:程序代码或操作过程) 实验采用三种方法求最大公约数 1、连续整数检测法。 2、欧几里得算法 3、分解质因数算法 根据实现提示写代码并分析代码的时间复杂度: 方法一: int f1(int m,int n) { int t; if(m>n)t=n; else t=m; while(t) { if(m%t==0&&n%t==0)break; else t=t-1; } return t; } 根据代码考虑最坏情况他们的最大公约数是1,循环做了t-1次,最好情况是只做了1次,可以得出O(n)=n/2; 方法二:int f2(int m,int n) {

r=m%n; while(r!=0) { m=n; n=r; r=m%n; } return n; } 根据代码辗转相除得到欧几里得的O(n)= log n 方法三: int f3(int m,int n) { int i=2,j=0,h=0; int a[N],b[N],c[N]; while(i

共享软件的破解技巧

一、常见的共享软件保护方式

正所谓“知己知彼,百站百胜”,在讨论如何破解“共享软件”之前,我们首先应该知道“共享软件”都采用了哪些保护方法

1.网上注册

目前大约80%的共享软件都采用网上注册。通常这类共享染件都会有使用时间上的限制,一旦过了试用期,就必须向软件开发者着册才能够继续使用。注册过程一般都是用户把自己的私人信息告诉给开发者,开发者再根据这些信息,按照一定的规则计算出注册码,用户付费后即可得到。最后,用户在软件的注册项中输入得到的注册码,完成注册。

2.警告窗口

警告窗口是软件设计者用来不断提醒用户购买正版软件的窗口,这样的窗口会在软件启动或运行过程中不时弹出,非常令人讨厌。此类软件注册后,窗口会自动消失。

3.限时器保护

有些共享软件具有时间限制功能,比如每次运行时间超过多少分钟就会自动关闭程序,必须重新启动才能正常运行。还有一种保护模式就是程序只能运行有限的次数和天数等,这是由软件内部的定时器控制运行时间的。

4.注册稳当保护

这是一种利用文本文件来注册软件的方式。注册文档是纯文字文件或二进制的文件,其内容是一些加密或未加密的数据,内容包括用户的注册信息,文件格式由开发者自行定义。试用版本软件中没有这个注册文档,只有当用户向开发者付费注册后,才会收到软件的注册文档。用户只要将该文档放入指定的目录中,就可以将软件注册。软件在每次启动的时从注册文档中读取数据,然后利用某种算法判断注册信息是否正确,进而决定以何种模式运行。

二、使用工具破解保护

了解了“共享软件”通常使用的保护方式后,我们再来看看目前常用的破解工具软件。

这里,我们推荐使用 Sunny FreeWizard 3.0

软件名称 Sunny FreeWizard 3.0

软件版本 3.0

授权方式共享软件

STEP1:下载安装 Sunny FreeWizard ,并运行安装程序。

STEP2:选择你要截取程序的限制,包括使用日期限制,使用天数限制,使用次数限制,启动时候弹出的确认窗户提醒注册。

STEP3:输入要阻止的软件提醒注册窗口,在这里可以随便输入。,进行窗户检测并确认启动程序。

STEP4:破解后再次启动被破解的工具,软件不再提示注册。

算法的时间复杂度计算

for(i=1;i<=n;i++) for(j=1;j<=i;j++) for(k=1;k<=j;k++) x++; 它的时间复杂度是多少? 自己计算了一下,数学公式忘得差不多了,郁闷; (1)时间复杂性是什么? 时间复杂性就是原子操作数,最里面的循环每次执行j次,中间循环每次执行 a[i]=1+2+3+...+i=i*(i+1)/2次,所以总的时间复杂性=a[1]+...+a[i]+..+a[n]; a[1]+...+a[i]+..+a[n] =1+(1+2)+(1+2+3)+...+(1+2+3+...+n) =1*n+2*(n-1)+3*(n-2)+...+n*(n-(n-1)) =n+2n+3n+...+n*n-(2*1+3*2+4*3+...+n*(n-1)) =n(1+2+...+n)-(2*(2-1)+3*(3-1)+4*(4-1)+...+n*(n-1)) =n(n(n+1))/2-[(2*2+3*3+...+n*n)-(2+3+4+...+n)] =n(n(n+1))/2-[(1*1+2*2+3*3+...+n*n)-(1+2+3+4+...+n)] =n(n(n+1))/2-n(n+1)(2n+1)/6+n(n+1)/2 所以最后结果是O(n^3)。 【转】时间复杂度的计算 算法复杂度是在《数据结构》这门课程的第一章里出现的,因为它稍微涉及到一些数学问题,所以很多同学感觉很难,加上这个概念也不是那么具体,更让许多同学复习起来无从下手,

下面我们就这个问题给各位考生进行分析。 首先了解一下几个概念。一个是时间复杂度,一个是渐近时间复杂度。前者是某个算法的时间耗费,它是该算法所求解问题规模n的函数,而后者是指当问题规模趋向无穷大时,该算法时间复杂度的数量级。 当我们评价一个算法的时间性能时,主要标准就是算法的渐近时间复杂度,因此,在算法分析时,往往对两者不予区分,经常是将渐近时间复杂度T(n)=O(f(n))简称为时间复杂度,其中的f(n)一般是算法中频度最大的语句频度。 此外,算法中语句的频度不仅与问题规模有关,还与输入实例中各元素的取值相关。但是我们总是考虑在最坏的情况下的时间复杂度。以保证算法的运行时间不会比它更长。 常见的时间复杂度,按数量级递增排列依次为:常数阶O(1)、对数阶O(log2n)、线性阶O(n)、线性对数阶O(nlog2n)、平方阶O(n^2)、立方阶O(n^3)、k次方阶O(n^k)、指数阶O(2^n)。 下面我们通过例子加以说明,让大家碰到问题时知道如何去解决。 1、设三个函数f,g,h分别为f(n)=100n^3+n^2+1000 , g(n)=25n^3+5000n^2 , h(n)=n^1.5+5000nlgn 请判断下列关系是否成立: (1)f(n)=O(g(n)) (2)g(n)=O(f(n)) (3)h(n)=O(n^1.5) (4)h(n)=O(nlgn) 这里我们复习一下渐近时间复杂度的表示法T(n)=O(f(n)),这里的"O"是数学符号,它的严格定义是"若T(n)和f(n)是定义在正整数集合上的两个函数,则T(n)=O(f(n))表示存在正的常数C和n0 ,使得当n≥n0时都满足0≤T(n)≤C?f(n)。"用容易理解的话说就是这两个函数当整型自变量n趋向于无穷大时,两者的比值是一个不等于0的常数。这么一来,就好计算了吧。 ◆(1)成立。题中由于两个函数的最高次项都是n^3,因此当n→∞时,两个函数的比值是一个常数,所以这个关系式是成立的。 ◆(2)成立。与上同理。 ◆(3)成立。与上同理。 ◆(4)不成立。由于当n→∞时n^1.5比nlgn递增的快,所以h(n)与nlgn的比值不是常数,

平均无故障时间的概述与应用

可靠性基本概念 平均无故障时间 何谓“平均无故障时间(MTBF)” ? “平均无故障时间(MTBF)”有什么用? “平均无故障时间(MTBF)” 和“平均故障前时间(MTTF)” “平均无故障时间(MTBF)”解读 平均无故障时间(MTBF)的应用 如何开始 如何计算 如何使用 基本流程、角色及职责 可靠性基本概念 可靠性Reliability ? 是指产品使用之后发生的故障,可靠性故障率是与时间相关的函数。 ? 可靠性表达方式有许多,主要有: ? 一段时间后的累积故障率(Cumulative fail %)。 ? 每10亿小时故障率“菲特” -FIT (Failures in Time) ? 平均无故障时间-MTBF (Mean Time between Failures) ? 可靠性是后质量部分的浴盆曲线即我们所认为的可靠性故障。 ? 可靠性的目标根据不同的因素而变化,如产品类型,产品寿命,使用的条件等。 平均无故障时间(MTBF)-何谓“平均无故障时间” What is MTBF MTBF (Mean Time Between Failure): 平均无故障时间,是衡量一个产品(尤其是电子产品)的可靠性指标. 单位为“小时”。 它反映了产品的时间质量,是体现产品在规定时间内保持功能的一种能力. 具体来说,是指相邻两次故障之间的平均工作时间,也称为平均故障间隔。 它仅适用于可维修产品,同时也规定产品在总的使用阶段累计工作时间和故障次数的比值为MTBF。 备注: 这个数据的取得通常必须要产品被使用过一定的数量以及一定的时间后,才能较为正确地被「统计」出来,所以一个新产品上市后的MTBF值也只能当 「参考数值」,跟产品的实际「寿命数值」不一定能相符。 不过目前有许多厂商用模拟的方式,来评估一个产品的平均故障时间。他们利用更恶劣的环境来测试产品,增加产品的老化速度,以計算出产品的平均故障时间。 平均无故障时间有什么用? 最流行的可靠性指标 最小化投入的可靠性初步分析 了解设计的薄弱环节 (KAIZEN)设计 质保能力分析(Warranty Analysis)

数控车床常用计算公式

数控车床常用计算公式 直径Φ 倒角量a 角度θ 正切函数tanθ 正弦函数sinθ 余弦函数cosθ 圆弧半径R 乘以号x 除以号÷先运算()内结果,再运算【】,再运算全式 一、外圆倒斜角计算 公式例子:Φ30直径外端倒角1、5x60°程式:GoX32Z2 1,倒角起点直径X=Φ-2xaxtanθ°X=30-2x1、5x1、732=24、804G1X24、804Z0F0、2 2,倒角起点长度Z=0其中tan60°由数学用表查出G1X30Z-1、5F0、15 3,倒角收点直径X=Φ;G1Z-50 4,倒角收点长度Z=-a。。。。。。 二、内圆倒斜角计算 公式例子:Φ20孔径外端倒角2x60°程式:GoX18Z2

1,倒角起点直径X=Φ+2xaxtanθ°x=20+2x2x1、732=26、928G1x26、928Z0F0、2 2,倒角起点长度Z=0G1X20Z-2F0、15 3,倒角收点直径X=Φ;G1Z-30 4,倒角收点长度Z=-a。。。。。。 三、外圆倒圆角计算 公式例子:Φ35直径外端圆角R3程式:GoX36Z2 1,倒角起点直径X=Φ-2*RX=35-2x3=29G1X29Z0F0、2 2,倒角起点长度Z=0G3X35Z-3R3F0、15 3,倒角收点直径X=Φ;G1Z-30 4,倒角收点长度Z=-R。。。。。。 四、内圆倒圆角计算 公式例子;Φ20孔径外端圆角R2程式:G0X18Z2 1,倒角起点直径X=Φ+2*RX=20+2x2=24G1X24Z0F0、2 2,倒角起点长度Z=0G2X20Z-2R2F0、1 3,倒角收点直径X=Φ;G1Z-25 4,倒角收点长度Z=-R。。。。。。 五、G90、G92数控指令R锥度值的计算: 例子:大端Φ35小端Φ32锥体长20牙长16mm让刀3mm加工 1、计算图上锥度比例值:(32-35)/20=-0、15程式;G0X37Z3 (起始端直径-收点端直径)÷锥体长度G92X33、8Z-16R-1、425F2

EXP GDC 使用指南beast

EXP GDC Laptop External Graphics Adapter DOCK 使用指南

请注意,不是教程中的每个设置都要操作的,根据笔记本出现的情况做相应的设置,大部分的机型是接上就可以用的。细心看教程,不要走马观花、一目十行,不然会走很多弯路的。每个机型不同,没有选项或无法设置的跳过操作. 目录 1、产品概述----------------------------------------------------------------------------------001 2、硬件安装----------------------------------------------------------------------------------002 3、系统配置与驱动安装--------------------------------------------------------------------004 4、外屏与内屏设置使用--------------------------------------------------------------------005 5、故障排除----------------------------------------------------------------------------------006 6、系统优化设置-----------------------------------------------------------------------------008

一、产品概述 PCI-E接口: 可以接驳任意PCI-E接口设备,包括显卡、声卡、阵列卡、视频卡、采集卡等。 6P电源输出: 最大提供6PIN+8PIN的接口输出,最大支持12A,与主板配合最大支持18A输出。如果使用功率超过220W的显卡请另配ATX转接

算法时间复杂度计算示例

算法时间复杂度计算示 例 Company number:【WTUT-WT88Y-W8BBGB-BWYTT-19998】

基本计算步骤? 示例一:? (1) int num1, num2; (2) for(int i=0; i

常用切削速度计算公式

常用切削速度計算公式 一、三角函數計算 1.tanθ=b/a θ=tan-1b/a 2.Sinθ=b/c Cos=a/c 二、切削刃上选定点相对于工件的主运动的瞬时速度。 2.1 铣床切削速度的計算 Vc=(π*D*S)/1000 Vc:線速度(m/min) π:圓周率(3.14159) D:刀具直徑(mm) 例題. 使用Φ25的銑刀Vc為(m/min)25 求S=?rpm Vc=πds/1000 25=π*25*S/1000 S=1000*25/ π*25 S=320rpm 2.2 车床切削速度的計算计算公式如下 v c=( π d w n )/1000 (1-1) 式中 v c ——切削速度 (m/s) ; dw ——工件待加工表面直径( mm ); n ——工件转速( r/s )。 S:轉速(rpm) 三、進給量(F值)的計算 F=S*Z*Fz F:進給量(mm/min) S:轉速(rpm) Z:刃數 Fz:(實際每刃進給) 例題.一標準2刃立銑刀以2000rpm)速度切削工件,求進給量(F 值)為多少?(Fz=0.25mm) F=S*Z*Fz F=2000*2*0.25 F=1000(mm/min) 四、殘料高的計算 Scallop=(ae*ae)/8R Scallop:殘料高(mm) ae:XY pitch(mm) R刀具半徑(mm) 例題. Φ20R10精修2枚刃,預殘料高0.002mm,求Pitch為多 少?mm Scallop=ae2/8R 0.002=ae2/8*10 ae=0.4mm 五、逃料孔的計算 Φ=√2R2 X、Y=D/4 Φ:逃料孔直徑(mm) R刀具半徑(mm) D:刀具直徑(mm) 例題. 已知一模穴須逃角加工(如圖), 所用銑刀為ψ10;請問逃角孔最小 為多少?圓心座標多少? Φ=√2R2 Φ=√2*52 Φ=7.1(mm) X、Y=D/4 X、Y=10/4

Beast中beagle库的使用-注意by项丹

Beast中beagle库的使用-注意 by项丹 曾经在科学网上看到彭友松老师发的《Beast中beagle库的使用》尝试着修改了一下环境变量,没有运行成功,仔细比对了一下JDK文件的环境变量设置,发现新手需要注意的问题。如果是设置过JAVA环境变量的电脑,可以直接在classpath后面加上beagle安装目录。 前面都没有问题: 在windows下,首先找到beagle安装目录,比如在C:/Program Files/Common Files/libhmsbeagle/。然后设置环境变量如下: 右键点我的电脑。打开属性。然后选择“高级”里面的“环境变量”,在新的打开界面中的系统变量需要设置三个属性“JAVA_HOME”、“path”、“classpath”. 一:点“新建”,然后在变量名写上JAVA_HOME,就是java的安装路径,然后在变量值写入java安装的路径(比如“C:jdk1.6”)。 注意:需要下载jdk文件安装,而不是普通的jre文件路径 二:其次在系统变量里面找到path,然后点编辑,path变量的含义就是系统在任何路径下都可以识别java命令,则变量值为“.;%JAVA_HOME%bin”,(其中“%JAVA_HOME%”的意思为刚才设置JAVA_HOME的值),也可以直接写上 “C:jdk1.6bin”。 注意: java环境变量设置中path变量值为 【%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;】将括号里面的全部复制 三:最后再点“新建”,然后在变量名上写classpath,该变量的含义是为java 加载类(class or lib)路径,只有类在classpath中,java命令才能识别。其值为“.;%JAVA_HOME%libdt.jar;%JAVA_HOME%libtoos.jar (要加.表示当前路径)”,与相同“%JAVA_HOME%有相同意思” 。在后面加上beagle安装目录 C:/Program Files/Common Files/libhmsbeagle/就OK了。 注意:比对java环境变量设置后,这里应该是 【.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;】后面加上beagle 安装目录即:【.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar; C:/Program Files/Common Files/libhmsbeagle/】将括号里面的全部复制

数控机床的平均无故障时间

MTBF即平均无故障时间,英文是“Mean Time Between Failure”,具体是指产品从一次故障到下一次故障的平均时间,是衡量一个产品的可靠性指标(仅用于发生故障经修理或更换零件能继续工作的设备或系统),单位为“小时”。数控机床常用它作为可靠性的定量指标。 MTBF的数值是怎样算出来的呢,假设一台电脑的MTBF为3万小时,是不是把这台电脑连续运行3万小时检测出来的呢?当然不是,否则有那么多产品要用几十年都检测不完。MTBF值的计算方法,目前最通用的权威性标准是MIL-HDBK-217(美国国防部可靠性分析中心及Rome实验室提出并成为行业标准,专门用于军工产品)、GJB/Z299B(中国军用标准)和Bellcore(AT&T Bell 实验室提出并成为民用产品MTBF的行业标准)。 MTBF计算中主要考虑的是产品中每个元器件的失效率。但由于器件在不同的环境、不同的使用条件下其失效率会有很大的区别,所以在计算可靠性指标时,必须考虑这些因素。而这些因素几乎无法通过人工进行计算,但借助于软件如MTBFcal和其庞大的参数库,就能够轻松地得出MTBF值。 每天工作三班的工厂如果要求24小时连续运转、无故障率P(t)=99%以上,则机床的MTBF 必须大于4500小时。MTBF5000小时对由不同数量的数控机床构成的生产线要求就更高、更复杂了,我们这里只讨论单台机床: 如果主机与数控系统的失效率之比为10:1(数控系统的可靠性要比主机高一个数量级),数控系统的MTBF就要大于5万小时,而其中的数控装置、主轴及驱动部分等主要部分的MTBF就必须大于10万小时。 其实,我们不必关注MTBF值如何计算,只要知道选择MTBF值高的产品,将给我们带来更高的竞争力。 当然了,也不是MTBF值越高越好,可靠性越高机床成本也越高,根据实际需要选择适度可靠就行了

电影字幕翻译中功能对等理论应用分析_以电影_冰河世纪3_字幕翻译为例

[收稿日期]2012-01-03[作者简介]陈 玉(1986-),女,2010级硕士研究生,主要从事翻译理论与实践研究。 第33卷第7期2012年7月哈尔滨学院学报 JOURNAL OF HARBIN UNIVERSITY Vol.33No.7Jul.2012 [文章编号] 1004—5856(2012)07—0068—04电影字幕翻译中功能对等理论应用分析 ———以电影《冰河世纪3》字幕翻译为例 陈 玉 (广西师范学院外国语学院,广西南宁530001) [摘要]文章以电影《冰河世纪3》翻译为例,试图在奈达的功能对等理论指导下分析电影字幕翻 译,介绍译者在功能对等原则的指导下采用的翻译技巧,探索功能对等理论对电影字幕翻译的指导作 用。 [关键词]功能对等理论;《冰河世纪3》;字幕翻译;观众反应[中图分类号] H315.9[文献标识码] A 一、引言 电影翻译是一种特殊的文学形式,译者在选用准确、生动的语言再现原片的思想性、艺术性以保证翻译语言准确生动的同时,还要使之 与剧中人物的表情、 口吻一致。[1] 我国在影视翻译研究方面起步较晚,不仅 从事这方面研究的人员较少,发表的学术文章有限,研究范围也比较零散、片面,尚未有成体 系的理论出现。 [2] 国外在影视翻译研究领域起步早,许多翻 译理论已经被运用到影视翻译研究中, 有关联理论、 目的论、描述性翻译学和多元系统视角,勒菲弗尔的权力操控论和韦努蒂的归化理论等。[3] 国内也有类似的尝试,但运用的范围较狭窄,主要有以下方面:以关联理论翻译观来解释电影配音或字幕翻译;把目的论、功能对等原 则和合作原则应用于影视翻译, 两者都强调译者结合翻译的目的与译文接受者(观众)的情况和反应;从原作所提供的多源信息中进行选 择性的翻译, 如将读者接受理论应用于字幕翻译中的隐喻翻译或目的论视角下的华语古装片 英文字幕的翻译。 总的来说,国内电影字幕翻译研究取得了一定成果,但其作为一个新兴的研究领域还有很大的空间,电影字幕翻译研究任重而道远。 二、功能对等理论在电影字幕翻译中的运用 美国翻译理论家奈达在20世纪六七十年 代提出功能对等理论,他指出 ,“翻译是用最恰当、自然和对等的语言从语义到文体再现原语 的信息。”[4](P85)要达到理想的翻译,就要找到 与原文最自然且切近的对等语。也就是说译入语的读者对译入语的反应要等值于原语读者对原语的反应。为了准确地再现原语文化和消除文化差异,译者应遵循三个步骤:第一,努力创造出既符合原文语义又体现原文文化特色的译作。然而由于两种语言代表着两种完全不同的文化,完全展现原文文化内涵的完美的翻译作品是不可能存在的,译者只能最大限度地再现原语文化。第二,如果意义和文化不能同时兼

算法的时间复杂度

算法的时间复杂度 Prepared on 22 November 2020

时间复杂度:如果一个问题的规模是n,解这一问题的某一算法所需要的时间为T(n),它是n的某一函数,T(n)称为这一算法的“时间复杂度”。渐近时间复杂度:当输入量n逐渐加大时,时间复杂性的极限情形称为算法的“渐近时间复杂度”。 当我们评价一个算法的时间性能时,主要标准就是算法的渐近时间复杂度,因此,在算法分析时,往往对两者不予区分,经常是将渐近时间复杂度T(n)=O(f(n))简称为时间复杂度,其中的f(n)一般是算法中频度最大的语句频度。 此外,算法中语句的频度不仅与问题规模有关,还与输入实例中各元素的取值相关。但是我们总是考虑在最坏的情况下的时间复杂度。以保证算法的运行时间不会比它更长。 常见的时间复杂度,按数量级递增排列依次为:常数阶O(1)、对数阶 O(log2n)、线性阶O(n)、线性对数阶O(nlog2n)、平方阶O(n^2)、立方阶O(n^3)、k次方阶O(n^k)、指数阶O(2^n)。 下面我们通过例子加以说明,让大家碰到问题时知道如何去解决。 1、设三个函数f,g,h分别为 f(n)=100n^3+n^2+1000 , g(n)=25n^3+5000n^2 , h(n)=n^+5000nlgn 请判断下列关系是否成立: (1) f(n)=O(g(n)) (2) g(n)=O(f(n)) (3) h(n)=O(n^ (4) h(n)=O(nlgn)

这里我们复习一下渐近时间复杂度的表示法T(n)=O(f(n)),这里的"O"是数学符号,它的严格定义是"若T(n)和f(n)是定义在正整数集合上的两个函数,则T(n)=O(f(n))表示存在正的常数C和n0 ,使得当n≥n0时都满足0≤T(n)≤Cf(n)。"用容易理解的话说就是这两个函数当整型自变量n趋向于无穷大时,两者的比值是一个不等于0的常数。这么一来,就好计算了吧。 ◆ (1)成立。题中由于两个函数的最高次项都是n^3,因此当n→∞时,两个函数的比值是一个常数,所以这个关系式是成立的。 ◆(2)成立。与上同理。 ◆(3)成立。与上同理。 ◆(4)不成立。由于当n→∞时n^比nlgn递增的快,所以h(n)与nlgn的比值不是常数,故不成立。 2、设n为正整数,利用大"O"记号,将下列程序段的执行时间表示为n的函数。 (1) i=1; k=0 while(i

相关主题