执行以下代码行将绘制一些二进制图。
BDDPlot[depth_, funValues_] :=
Module[{BDDLabels, INVEdges},
BDDLabels = Thread[Range[2^depth - 1] -> Join[Alphabet[][[Floor[Log2[#]] + 1]] & /@ Range[2^(depth - 1) - 1], funValues]];
INVEdges =
Flatten[ Map[{#1 \[UndirectedEdge] #1*2 ->
Dashed, {#1 \[UndirectedEdge] #1*2 + 1 -> {Thick, Black}}} &,
Range[2^(depth - 1)]]];
CompleteKaryTree[depth,
VertexShapeFunction -> "Circle",
VertexSize -> Large,
VertexLabels ->
MapAt[Placed[#, Center] &,
BDDLabels, {All, 2}], EdgeStyle -> INVEdges ,
VertexLabelStyle -> {Large}, VertexStyle -> White, ImageSize -> Large]]
BDDPlot[3, {0, 1, 0, 0}] (* Drawing BDD example *)
然后右键单击绘制并选择“另存图形为”,将导致以下错误:
Set::write: Tag Inherited in Inherited[State] is Protected.
任何想法都会引起错误,以及如何解决此问题,将不胜感激。
答案 0 :(得分:0)
错误已报告给Mathematica。
解决方案是:Export["~/graph.pdf", BDDPlot[3, {0, 1, 0, 0}]];