Tag Info

Hot answers tagged

9

The answer (if it can be called one) seems to be rooted in type-inferencing. The first observation you can make is that Break[] is considered a top-level function, rather than a statement, and is wrapped in a Function to be executed by main evaluator (in byte-code instructions): Function[{xs}, If[Compile`FunctionVariable$38938 < 5., Break[], ++i]] This ...


8

This is a bug in Pick caused by SparseArray, has nothing to do with Graph. Minimal example (SparseArray object is the fullform version of your vLM): x = {1, 2, 3, 4, 5, 6}; Pick[x, SparseArray[Automatic, {6}, 0, {1, {{0, 3}, {{2}, {3}, {4}}}, {1, 1, 1}}], 0]; FullForm@x {1, System`Private`InternSequence[], System`Private`InternSequence[], ...


5

I was surprised that Graph supports 3D coordinates at all (!!). Layout algorithms supported in Graph are 2D only. The problem doesn't seem to be with Graph itself but the Graphics3D object it translates to. Here's a smaller example of the same: Show@Graph[{1 -> 2}, VertexCoordinates -> {1 -> {0, 0, 0}, 2 -> {1, 0, 0}}] Show converts it to a ...


4

Wrong use of Graph in this case I believe. I think the following does what you're after: Graphics3D[{FaceForm[], EdgeForm[Blue], PolyhedronData["GreatRhombicosidodecahedron", "Faces"], PointSize[Large], Red, Point /@ PolyhedronData["GreatRhombicosidodecahedron", "VertexCoordinates"]}, Boxed -> False]


4

Here is a manual EdgeRenderingFunction that you can start from if you supply your labels as lists. erf = Module[{spacing = .2, transform = Last@FindGeometricTransform[#, {{0, 0}, {1, 0}}]}, {Text[#, transform[{1/2, #2}]], GeometricTransformation[ Arrow[BSplineCurve[{{0, 0}, {1/3, #2}, {2/3, #2}, {1, 0}}, ...


3

This is a bug which seems to be related to the fact that the foreshortening of the arrow is not scaled correctly with the end points of the arrow. The head and shaft of the arrow are treated separately, which may have some benefits (for example, it allows you to independently specify an option Appearance in Arrowheads that determines if the head appears ...


3

This looks like a bug to me. Here is a slightly more minimal example. ue = UndirectedEdge; g = Graph[ue @@@ {{1, 2}, {2, 3}, {1, 3}, {1, 4}, {4, 5}, {4, 6}}]; vl = VertexList[g] aM = AdjacencyMatrix[g]; vLM = aM[[VertexIndex[g, 1]]]; Pick[vl, vLM, 0]; VertexList[g] Output {1, 2, 3, 4, 5, 6} {1, 5, 6} You can solve the error by making a copy of the ...


3

I reported this to WRI tech support on March 9th and, finally received an answer today. As I promised in a comment to the question, here it is (somewhat edited). My apologies for the delay in getting back to you. Just wanted to let you know that I was unable to find a resolution for this issue and have forwarded an incident report to the ...


1

I have just sent a bug report to Wolfram myself. I'm running Mathematica 9.0.1 on Windows 8.1 64 Bit. As user7987 already found out, Mathematica seems to compute the wrong derivatives (functions D or ' or Derivative), if the BSplineFunction is rational (at least one weight different from 1.0). The ND function on the other hand gets the correct result. ...



Only top voted, non community-wiki answers of a minimum length are eligible