| bio | website | |
|---|---|---|
| location | ||
| age | ||
| visits | member for | 1 year, 3 months |
| seen | May 12 at 5:41 | |
| stats | profile views | 68 |
|
May 21 |
revised |
Efficient setting of properties of multiple vertices in Graph added 466 characters in body |
|
May 21 |
comment |
Efficient setting of properties of multiple vertices in Graph I +1 @LeonidShifrin comments because I think he gets what I am asking for, although I see that my question did not pin-point it. I should also clarify that I am interested in modifying individual vertex properties, not "global graph" properties. I +1 both answers because they do contain useful information, even though I had already tried what they suggested. |
|
May 21 |
comment |
Efficient setting of properties of multiple vertices in Graph I had tried similar approaches. What I was looking for was an alternative that didn't involve several distinct calls to SetProperty or PropertyValue, perhaps by avoiding those functions altogether and doing some rule-replacement combo on the Graph directly. Why isn't something like that implemented in Mathematica? |
|
May 21 |
comment |
Property assignment on a graph vertex using PropertyValue does not work inside a function @SjoerdC.deVries Ok. Now I almost got it. Except for the fact that now I don't understand how PropertyValue works, since it doesn't have a HoldFirst attribute: Attributes[PropertyValue] returns {Protected}. To me it looks contrary to the behavior that you explain, but I guess I'm missing something ... ?? |
|
May 21 |
awarded | Nice Question |
|
May 21 |
comment |
Property assignment on a graph vertex using PropertyValue does not work inside a function @SjoerdC.deVries I just realized I have one more question. What does a Graph object evaluate to? I thought they were atomic. Why do I have to put a HoldFirst? When I create a function that takes as argument an Integer, I'll just use f[x_Integer], and I don't have to put a HoldFirst. So, if Graph is atomic, shouldn't it behave in the same way? |
|
May 21 |
comment |
Resources for beautiful Mathematica Stylesheets In the existing stylesheets for mathematical documents (such as Article), I have a nasty issue with numbered formulas: When the number identifying the formula is large (say three digits), for some reason it doesn't fit and gets broken into two lines, which is VERY ugly. (I am too lazy to go through the trouble of creating & maintaining a new question for this issue right now, so I'll just say it here. It is related to the current question anyways.) |
|
May 21 |
comment |
Resources for beautiful Mathematica Stylesheets +1 I am interested in seeing answers for this one. In particular, I would like to know about alternative stylesheets for mathematical documents (i.e., documents containing lots of inline and display formulas). |
|
May 21 |
awarded | Nice Question |
|
May 20 |
comment |
What's wrong with this pattern of the form Except[Repeated[…]]? @Rojo I can't test the speed right now either, but will do it soon and post here. |
|
May 20 |
comment |
Efficient setting of properties of multiple vertices in Graph @Ajasja I think the version-8 tag is important here. Especially because in Mathematica 8 there are three distinct ways of dealing with graphs: two are the Combinatorica package and the GraphPlot et al, which have been there at least since version 6; the other is the Graph object, which is new to version 8. The tag graphs-and-networks alone would not make this distinction. |
|
May 20 |
comment |
What's wrong with this pattern of the form Except[Repeated[…]]? I accepted @Rojo answer before because, as you say, it's the neatest solution to the how question. But you're right that your answer is the only one that truly fits my question. |
|
May 20 |
accepted | What's wrong with this pattern of the form Except[Repeated[…]]? |
|
May 20 |
asked | Efficient setting of properties of multiple vertices in Graph |
|
May 20 |
comment |
Property assignment on a graph vertex using PropertyValue does not work inside a function @SjoerdC.deVries Got it. |
|
May 20 |
accepted | Property assignment on a graph vertex using PropertyValue does not work inside a function |
|
May 20 |
comment |
Property assignment on a graph vertex using PropertyValue does not work inside a function It works. But then I tried using board_Graph instead of board_ /; Head[board] === Graph and it didn't work. Why? |
|
May 20 |
comment |
What's wrong with this pattern of the form Except[Repeated[…]]? " Except is a single argument, not a sequence." ... So that explains why my code doesn't work. But then, is there some sort of SequenceExcept in Mathematica? |
|
May 20 |
comment |
What's wrong with this pattern of the form Except[Repeated[…]]? @Rojo As you say, I just need a wrapper, so that when I pattern match something like _Mol, I can be sure that it is formatted in the correct way. |
|
May 20 |
comment |
What's wrong with this pattern of the form Except[Repeated[…]]? where Mol1 is defined with Heike's method and Mol2 is defined with your method. I get {{0., Null}, {0.015, Null}}. |

