Mathematica 9 is now available
Student Support Forum
-----
Student Support Forum: 'pattern matching' topicStudent Support Forum > General > "pattern matching"

Next Comment >Help | Reply To Topic
Author Comment/Response
dvori
09/04/08 09:39am

given the next list:

{{{1, 5}, EdgeWeight -> 12}, {{2, 5}, EdgeWeight -> 15}, {{2, 6},
EdgeWeight -> 14}}

how can I use pattern matching to replace the source vertices with other vertices as I choose?
for example the desired output is instead of vertex 2 I want vertex 7:

{{{1, 5}, EdgeWeight -> 12}, {{7, 5}, EdgeWeight -> 15}, {{7, 6},
EdgeWeight -> 14}}

URL: ,

Subject (listing for 'pattern matching')
Author Date Posted
pattern matching dvori 09/04/08 09:39am
Re: pattern matching dvori 09/04/08 11:53pm
Re: pattern matching Tom 09/05/08 10:35am
Re: pattern matching yehuda ben-s... 09/05/08 10:45am
Next Comment >Help | Reply To Topic