public class IDUtils
extends java.lang.Object
Constructor and Description |
---|
IDUtils() |
Modifier and Type | Method and Description |
---|---|
static int |
globalToLocal(int numBlocks,
long globalId)
Converts a global vertex ID to local vertex ID.
|
static long |
localToGlobal(int numBlocks,
int blockId,
int localId)
Converts a local vertex ID to global vertex ID.
|
public static int globalToLocal(int numBlocks, long globalId)
numBlocks
- The number of total vector blocksglobalId
- A global ID of vertexpublic static long localToGlobal(int numBlocks, int blockId, int localId)
numBlocks
- The number of total vector blocksblockId
- An ID of vector block who contains the vertexlocalId
- A local ID of vertex