File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

reference to array element

 
ernest mcdermott
Greenhorn
Posts: 28
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi everyone,
iv currently got a minimal spanning tree style piece of code. I currently have a start vertex and an edge away. Next i want to retrieve the name of the next vertex that this edge leads to.

Currently i have the following code:

where:
n is an array of vertice names
ce[i] is the chosen edge

i want the value for i, say that it represents element 3 in the array, i want this to then choose element 3 in the array of vertice names as this is the next vertice that it leads to.
im sorry if the question seems a little unclear, this is the best way i could think to propose it.
Thanks in advance
 
ernest mcdermott
Greenhorn
Posts: 28
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all, ok iv now got it going the right direction, but the problem is that it outputs the word null as oposed to the vertex name. Can any1 suggest what might be wrong.
Thanks in advance.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic