dot

考虑碰撞的二能级原子和电磁场的相互作用

限于喜欢 提交于 2020-01-27 07:58:57
描述有耗散系统的密度算符的方程为 (Scully. Quantum Optics \(\S5.3\) ) \[ \dot{p}=-\frac{i}{\hbar}[H, p]-\frac{1}{2}\{\Gamma, p\} \quad \Gamma_{i j}=\gamma_{i j} \delta_{i j} \] 二能级原子在偶极近似下,把上面方程展开有 \[ \dot{\rho}_{aa}=-\gamma_{a} \rho_{aa}+\frac{i}{\hbar}\left[\wp_{ab} E \rho_{b a}-\text{c.c.}\right] \\ \dot{\rho}_{bb}=-\gamma_{b} \rho_{b b}-\frac{i}{\hbar}\left[\wp_{a b} E \rho_{b a}-\text{c.c.}\right]\\ \dot{\rho}_{ab}=-(i\omega+\gamma_{ab})\rho_{ab}-\frac{i}{\hbar}\wp_{ab}E(\rho_{aa}-\rho_{bb}) \] 其中 \(\omega\) 为原子跃迁频率(a为上能级,b为下能级), \(\gamma_{ab}=(\gamma_a+\gamma_b)/2\) ,而 \(\wp_{ab}\) 是电偶极矩(其实是矢量,取为实的),而 \

十分钟学会graphviz画图

北城以北 提交于 2020-01-26 05:44:17
一、认识graphviz 接触graphviz是几年前的一个项目,要画出数据网络的布局,使用graphviz能比较清楚的画出数据之间的关系。 可以在gallery中查看他能完成的图形: http://www.graphviz.org/gallery/ 。graphviz最方便的地方在于能够很快的清晰的画出点与点之间的关系,并且有许多布局算法能够很好的去布局。 之前使用它画过流程图,如: image.png 还有决策树。使用twopi画出数据的关联关系: image.png 二、安装graphviz 官网下载: http://www.graphviz.org/download/。 根据自己的版本来选择: image.png 安装在任意喜欢的位置。但是需要把安装目录的 graphviz/bin 加入环境变量 PATH 里,我这里只写了相对路径。 打开cmd,输入: dot --help ,如果弹出以下信息,就是安装成功: image.png 三、使用graphviz 3.1 基本信息 graphviz中包含了众多的布局器: dot 默认布局方式,主要用于有向图 neato 基于spring-model(又称force-based)算法 twopi 径向布局 circo 圆环布局 fdp 用于无向图 以上布局我都使用过,但是个人比较倾向dot和twopi,可以根据需求来画图。 3.2

Merge two dot graphs at a common node in python

前提是你 提交于 2020-01-23 04:09:07
问题 The dependency-parsed output (using Stanford Parser) of the following two sentences are as follows. Sentence 1 - John is a computer scientist Dot format - digraph G{ edge [dir=forward] node [shape=plaintext] 0 [label="0 (None)"] 0 -> 5 [label="root"] 1 [label="1 (John)"] 2 [label="2 (is)"] 3 [label="3 (a)"] 4 [label="4 (computer)"] 5 [label="5 (scientist)"] 5 -> 2 [label="cop"] 5 -> 4 [label="compound"] 5 -> 3 [label="det"] 5 -> 1 [label="nsubj"] } Graph - Sentence 2 - John has an elder

How do I get DOT to display an image for a node?

爱⌒轻易说出口 提交于 2020-01-22 08:46:04
问题 I am not having success displaying an image at a node in dot. My node is defined: SW103 [image="swOpen.png"] I can view swOpen.png so I think the file is ok, and it is in the same directory as the code. But dot displays the node using its label "SW103", not as the image. The documentation mentions that the image file should have size information in it, but I don't know what to put in it. Could someone point me to an actual example that displays a .png or .bmp file as a node? (include the

原生js实现无缝轮播

五迷三道 提交于 2020-01-19 05:40:45
原生js实现无缝轮播   因为要做到无缝,所以就要把第一张图片和最后一张连接起来,在此处采用js克隆了第一张图片的节点,添加到最后,显示图片序号的小圆按钮也是使用js动态添加的。 html部分 <div class="banner" id="banner"> <ul class="pic" id="pic"> <li><a href="javascript:void(0)"><img src="images/1.jpg"></a></li> <li><a href="javascript:void(0)"><img src="images/2.png"></a></li> <li><a href="javascript:void(0)"><img src="images/3.png"></a></li> <li><a href="javascript:void(0)"><img src="images/4.png"></a></li> <li><a href="javascript:void(0)"><img src="images/5.jpg"></a></li> <li><a href="javascript:void(0)"><img src="images/6.png"></a></li> <li><a href="javascript:void(0)"><img src=

js 模板引擎 为什么选择 dot

元气小坏坏 提交于 2020-01-16 02:31:01
我的上篇博文详细介绍了jquery tmpl,因为我想在我的项目里引入JS模版,所以就研究了一下,有人告诉我这个引擎的速度很慢,于是我又去搜集了一下资料,结果发现jquery tmpl是最慢的,于是乎我就放弃了,对比下来发现胜出的有以下几种artTemplate,dot,juicer三个从速度上胜出(chrome),但是在IE下最终选择了dot,dot的文件是最小只有5K(没有压缩),并且在IE里也是最快的。 下面介绍下dot的用法,其实用法非常简单 dot的API里有以下几种标签 //{{ }} JS原生态代码 //{{= }} 变量运算,赋值 {{=it.f1 + it.f2}} //{{! }} 赋值并且编码 //{{# }} //{{## #}} 上面两个没有仔细研究,基本我也不用它 //{{? }} 条件语句 //{{~ }} 循环 其实条件语句和循环可以用{{if}}{{else if}}{{for(var i=0;i<length;i++)}}来代替,也就是JS的原生态代码 那么我们用到的只有前三种标签就完全够用了,下面给出一个例子,就很容易看明白了 <script id="tmpl-demo" type="text/tmpl"> {%if($data.suc){%} {%for (var i = 0; i < $data.users.length; i++) { %

Generate AST in the form of a dot file

≯℡__Kan透↙ 提交于 2020-01-15 04:30:50
问题 I am working with ANTLR4 to generate AST of a java source code and i had to move to ANTLR3 because i was not getting much help and documentation and it was really tough to proceed.I managed to generate AST but not in a visual format. Then i came across an awesome answer and i was really able to generate AST in a DOT file but there was a slight problem. My code: import org.antlr.runtime.CommonTokenStream; import org.antlr.runtime.ANTLRFileStream; import org.antlr.runtime.tree.CommonTree;

Generate AST in the form of a dot file

强颜欢笑 提交于 2020-01-15 04:30:26
问题 I am working with ANTLR4 to generate AST of a java source code and i had to move to ANTLR3 because i was not getting much help and documentation and it was really tough to proceed.I managed to generate AST but not in a visual format. Then i came across an awesome answer and i was really able to generate AST in a DOT file but there was a slight problem. My code: import org.antlr.runtime.CommonTokenStream; import org.antlr.runtime.ANTLRFileStream; import org.antlr.runtime.tree.CommonTree;

Graphviz Dot Edge Ports for Family Tree

两盒软妹~` 提交于 2020-01-15 03:40:07
问题 I am very close to being able to generate a family tree that doesn't look terrible, but I'm running into the following problem. //file: tree.dot digraph { edge [dir=none]; node [ fillcolor="black",fixedsize=true,shape=box, style="rounded,filled",width=2.0 ]; splines=ortho; // GEN -01 { rank=same; rankdir=LR; "Grandfather" [regular=0]; m0002 [ label="",shape=diamond,regular=0,height=0.25, width=0.25,style="filled", ]; "Grandmother" [regular=0]; { rank=same; rankdir=LR; "Grandfather" -> m0002 -

Visualize tree from *.dot file

好久不见. 提交于 2020-01-14 05:39:10
问题 I need to visualize a tree which I have gotten from an ANTLR parser and written to a .dot file by catching console output that the ANLR dot generator produces. MyDOTTreeGenerator generator = new MyDOTTreeGenerator(); PrintStream old = System.out; try { System.setOut(new PrintStream(new FileOutputStream(graphFile))); } catch (FileNotFoundException e) { e.printStackTrace(); } System.out.println(generator.toDOT(root)); System.out.flush(); System.setOut(old); Question is: 1. Is there a way to