This week's book giveaway is in the Cloud/Virtualizaton forum.
We're giving away four copies of Mesos in Action and have Roger Ignazio on-line!
See this thread for details.
Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
    Bookmark Topic Watch Topic
  • New Topic

if statements in java

 
Joanna Spence
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Report post to moderator
I am traversing an adjacency matrix

if I am in a for loop and want to check if
an adj matrix adjmatrix[x][y] has an entry at index x and index y in a if statement; how would i do that?

right now i have

[code]
if(adj[x][y] && value[x]< -priority)
{
}

but java doesn't like it

So, how would I say, in an "if" statement

if the adjacency matrix has an entry at [x][y]
how would i write that in java?

Thanks.

 
Tom Reilly
Rancher
Posts: 618
  • Mark post as helpful
  • send pies
  • Report post to moderator
This is a double post. See Priority First Search and Adjacency Matrix
 
    Bookmark Topic Watch Topic
  • New Topic