英语翻译The scattering program requires the Scatter,ScatterAnalysis,and ScatterApp classes.The ScatterApp class in Listing 5.6 organizes the startup process and creates the visualizations.As usual,it extends AbstractSimul ati on by overriding the
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/15 17:19:07
英语翻译The scattering program requires the Scatter,ScatterAnalysis,and ScatterApp classes.The ScatterApp class in Listing 5.6 organizes the startup process and creates the visualizations.As usual,it extends AbstractSimul ati on by overriding the
英语翻译
The scattering program requires the Scatter,ScatterAnalysis,and ScatterApp classes.The ScatterApp class in Listing 5.6 organizes the startup process and creates the visualizations.As usual,it extends AbstractSimul ati on by overriding the doStep method.However,in this case a single step is not a time step.A step calculates a trajectory and scattering angle for the given impact parameter.After a trajectory is calculated,the impact parameter is incremented and the panel is repainted.If necessary,you can eliminate this visualization to increase the computational speed.If the new impact parameter exceeds the beam radius bmax,the animation is stopped and the accumulated data is analyzed.Note that the cal cul ateTrajectory method returns true if the calculation succeeded and that an error message is printed if the calculation fails.Including a failsafe mechanism to stop a computation is good programming practice.
英语翻译The scattering program requires the Scatter,ScatterAnalysis,and ScatterApp classes.The ScatterApp class in Listing 5.6 organizes the startup process and creates the visualizations.As usual,it extends AbstractSimul ati on by overriding the
散射程序要求散射开ScatterAnalysis和ScatterApp类程序6中的ScatterApp类系统化启动步骤并且创建可视化.它用最重要的doStep方法继承抽象模拟.可是,在这种情况下,单一的步骤不是一个时间间隔.一个步骤计算轨道和碰撞系数得出的散射角.但轨道被计算出来后,碰撞系数在增加并且面板被重新绘制.如果需要,你可以消除可视化来增加计算速度.如果新的碰撞系数超过了最大束半径,动画停止并且分析积累的数据.注意,如果计算成功,calculateTrajectory方法返回true,如果计算失败,一条错误的消息显示出来.包含一个故障防护机制去停止计算是一个很好的程序编制习惯.
散射程序要求分散,ScatterAnalysis和ScatterApp类。清单5.6 ScatterApp类组织的启动过程,并创建可视化。像往常一样,它延伸AbstractSimul ATI的由覆盖doStep方法。但是,在这种情况下一个步骤是不是一步一个脚印。阿步计算一个给定的碰撞参数轨迹和散射角。经过轨迹计算,碰撞参数递增,而面板会重新绘制。如果必要,可以消除这种可视化,以提高运算速度。如果新...
全部展开
散射程序要求分散,ScatterAnalysis和ScatterApp类。清单5.6 ScatterApp类组织的启动过程,并创建可视化。像往常一样,它延伸AbstractSimul ATI的由覆盖doStep方法。但是,在这种情况下一个步骤是不是一步一个脚印。阿步计算一个给定的碰撞参数轨迹和散射角。经过轨迹计算,碰撞参数递增,而面板会重新绘制。如果必要,可以消除这种可视化,以提高运算速度。如果新的冲击参数超过光束半径的Bmax,动画停止和积累的数据进行了分析。请注意,卡尔尽头ateTrajectory方法返回true,如果计算成功,并打印错误信息,如果计算失败。包括故障安全机制,以停止计算是良好的编程习惯。
收起