有什么办法可以改变文本90\xc2\xba的方向吗?
\n\n例子:
\n\n初始图:
\n\n
所需图表:
\n\n
我的代码:
\n\ndigraph G {\n layout="neato"\n edge[arrowhead=none]\n node[style=filled fillcolor="white", fixedsize=true]\n circunferencia[label="", pos="0.0, 0.0!", shape = "circle", width=2, color="grey", style=boldsi];\n 1[label="1()", pos="0.30901699437494745,0.9510565162951535!", shape = "circle"];\n 5[label="5()", pos="-0.8090169943749473,0.5877852522924732!", shape = "circle"];\n 4[label="4()", pos="-0.8090169943749476,-0.587785252292473!", shape = "circle"];\n 3[label="3()", pos="0.30901699437494723,-0.9510565162951536!", shape = "circle"];\n 2[label="2()", pos="1.0,-2.4492935982947064e-16!", shape = "circle"];\n centro[label="", pos="0.0, 0.0!", shape = "point", fillcolor=black];\n}\nRun Code Online (Sandbox Code Playgroud)\n 我想用一系列整数值初始化一个 ArrayList。这是我想要避免的:
ArrayList<Integer> numbers = new ArrayList<>();
for(int i = 0; i < x; i++){
numbers.add(i);
}
Run Code Online (Sandbox Code Playgroud)
我找到了 IntStream 的 rangeClosed 函数:
IntStream.rangeClosed(0, instance.getNumVertices()-1);
Run Code Online (Sandbox Code Playgroud)
但我认为转换为 ArrayList 不值得。
我在追求效率...