public class JNvgraph extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
initialize()
Initializes the native library.
|
static int |
nvgraphAllocateEdgeData(nvgraphHandle handle,
nvgraphGraphDescr descrG,
long numsets,
Pointer settypes)
Allocate numsets vectors of size E reprensenting Edge Data and attached them the graph.
|
static int |
nvgraphAllocateVertexData(nvgraphHandle handle,
nvgraphGraphDescr descrG,
long numsets,
Pointer settypes)
Allocate numsets vectors of size V reprensenting Vertex Data and attached them the graph.
|
static int |
nvgraphConvertGraph(nvgraphHandle handle,
nvgraphGraphDescr srcDescrG,
nvgraphGraphDescr dstDescrG,
int dstTType)
Convert graph to another structure
|
static int |
nvgraphConvertTopology(nvgraphHandle handle,
int srcTType,
Pointer srcTopology,
Pointer srcEdgeData,
Pointer dataType,
int dstTType,
Pointer dstTopology,
Pointer dstEdgeData)
Convert the edge data to another topology
|
static int |
nvgraphCreate(nvgraphHandle handle)
Open the library and create the handle
|
static int |
nvgraphCreateGraphDescr(nvgraphHandle handle,
nvgraphGraphDescr descrG)
Create an empty graph descriptor
|
static int |
nvgraphDestroy(nvgraphHandle handle)
Close the library and destroy the handle
|
static int |
nvgraphDestroyGraphDescr(nvgraphHandle handle,
nvgraphGraphDescr descrG)
Destroy a graph descriptor
|
static int |
nvgraphExtractSubgraphByEdge(nvgraphHandle handle,
nvgraphGraphDescr descrG,
nvgraphGraphDescr subdescrG,
Pointer subedges,
long numedges)
create a new graph by extracting a subgraph given a list of edges
|
static int |
nvgraphExtractSubgraphByVertex(nvgraphHandle handle,
nvgraphGraphDescr descrG,
nvgraphGraphDescr subdescrG,
Pointer subvertices,
long numvertices)
create a new graph by extracting a subgraph given a list of vertices
|
static int |
nvgraphGetEdgeData(nvgraphHandle handle,
nvgraphGraphDescr descrG,
Pointer edgeData,
long setnum)
Copy the edge set #setnum in *edgeData, sets have 0-based index
Conversions are not sopported so nvgraphTopologyType_t should match the graph structure
|
static int |
nvgraphGetGraphStructure(nvgraphHandle handle,
nvgraphGraphDescr descrG,
Object topologyData,
int[] TType)
Query size and topology information from the graph descriptor
|
static int |
nvgraphGetVertexData(nvgraphHandle handle,
nvgraphGraphDescr descrG,
Pointer vertexData,
long setnum)
Copy the edge set #setnum in *edgeData, sets have 0-based index
Conversions are not sopported so nvgraphTopologyType_t should match the graph structure
|
static int |
nvgraphPagerank(nvgraphHandle handle,
nvgraphGraphDescr descrG,
long weight_index,
Pointer alpha,
long bookmark_index,
int has_guess,
long pagerank_index,
float tolerance,
int max_iter)
nvGRAPH PageRank
Find PageRank for each vertex of a graph with a given transition probabilities, a bookmark vector of dangling vertices, and the damping factor.
|
static int |
nvgraphSetEdgeData(nvgraphHandle handle,
nvgraphGraphDescr descrG,
Pointer edgeData,
long setnum)
Update the edge set #setnum with the data in *edgeData, sets have 0-based index
Conversions are not sopported so nvgraphTopologyType_t should match the graph structure
|
static int |
nvgraphSetGraphStructure(nvgraphHandle handle,
nvgraphGraphDescr descrG,
Object topologyData,
int TType)
Set size, topology data in the graph descriptor
|
static int |
nvgraphSetVertexData(nvgraphHandle handle,
nvgraphGraphDescr descrG,
Pointer vertexData,
long setnum)
Update the vertex set #setnum with the data in *vertexData, sets have 0-based index
Conversions are not sopported so nvgraphTopologyType_t should match the graph structure
|
static int |
nvgraphSrSpmv(nvgraphHandle handle,
nvgraphGraphDescr descrG,
long weight_index,
Pointer alpha,
long x_index,
Pointer beta,
long y_index,
int SR)
nvGRAPH Semi-ring sparse matrix vector multiplication
|
static int |
nvgraphSssp(nvgraphHandle handle,
nvgraphGraphDescr descrG,
long weight_index,
Pointer source_vert,
long sssp_index)
nvGRAPH Single Source Shortest Path (SSSP)
Calculate the shortest path distance from a single vertex in the graph to all other vertices.
|
static String |
nvgraphStatusGetString(int status) |
static int |
nvgraphWidestPath(nvgraphHandle handle,
nvgraphGraphDescr descrG,
long weight_index,
Pointer source_vert,
long widest_path_index)
nvGRAPH WidestPath
Find widest path potential from source_index to every other vertices.
|
static void |
setExceptionsEnabled(boolean enabled)
Enables or disables exceptions.
|
static void |
setLogLevel(LogLevel logLevel)
Set the specified log level for the JNvgraph library.
|
public static void initialize()
public static void setExceptionsEnabled(boolean enabled)
cudnnStatus from the native methods.
If exceptions are enabled, a CudaException with a detailed error
message will be thrown if a method is about to set a result code
that is not nvgraphStatus.NVGRAPH_STATUS_SUCCESSenabled - Whether exceptions are enabledpublic static void setLogLevel(LogLevel logLevel)
logLevel - The log level to use.public static String nvgraphStatusGetString(int status)
public static int nvgraphCreate(nvgraphHandle handle)
public static int nvgraphDestroy(nvgraphHandle handle)
public static int nvgraphCreateGraphDescr(nvgraphHandle handle, nvgraphGraphDescr descrG)
public static int nvgraphDestroyGraphDescr(nvgraphHandle handle, nvgraphGraphDescr descrG)
public static int nvgraphSetGraphStructure(nvgraphHandle handle, nvgraphGraphDescr descrG, Object topologyData, int TType)
public static int nvgraphGetGraphStructure(nvgraphHandle handle, nvgraphGraphDescr descrG, Object topologyData, int[] TType)
public static int nvgraphAllocateVertexData(nvgraphHandle handle, nvgraphGraphDescr descrG, long numsets, Pointer settypes)
public static int nvgraphAllocateEdgeData(nvgraphHandle handle, nvgraphGraphDescr descrG, long numsets, Pointer settypes)
public static int nvgraphSetVertexData(nvgraphHandle handle, nvgraphGraphDescr descrG, Pointer vertexData, long setnum)
public static int nvgraphGetVertexData(nvgraphHandle handle, nvgraphGraphDescr descrG, Pointer vertexData, long setnum)
public static int nvgraphConvertTopology(nvgraphHandle handle, int srcTType, Pointer srcTopology, Pointer srcEdgeData, Pointer dataType, int dstTType, Pointer dstTopology, Pointer dstEdgeData)
public static int nvgraphConvertGraph(nvgraphHandle handle, nvgraphGraphDescr srcDescrG, nvgraphGraphDescr dstDescrG, int dstTType)
public static int nvgraphSetEdgeData(nvgraphHandle handle, nvgraphGraphDescr descrG, Pointer edgeData, long setnum)
public static int nvgraphGetEdgeData(nvgraphHandle handle, nvgraphGraphDescr descrG, Pointer edgeData, long setnum)
public static int nvgraphExtractSubgraphByVertex(nvgraphHandle handle, nvgraphGraphDescr descrG, nvgraphGraphDescr subdescrG, Pointer subvertices, long numvertices)
public static int nvgraphExtractSubgraphByEdge(nvgraphHandle handle, nvgraphGraphDescr descrG, nvgraphGraphDescr subdescrG, Pointer subedges, long numedges)
public static int nvgraphSrSpmv(nvgraphHandle handle, nvgraphGraphDescr descrG, long weight_index, Pointer alpha, long x_index, Pointer beta, long y_index, int SR)
public static int nvgraphSssp(nvgraphHandle handle, nvgraphGraphDescr descrG, long weight_index, Pointer source_vert, long sssp_index)
public static int nvgraphWidestPath(nvgraphHandle handle, nvgraphGraphDescr descrG, long weight_index, Pointer source_vert, long widest_path_index)
public static int nvgraphPagerank(nvgraphHandle handle, nvgraphGraphDescr descrG, long weight_index, Pointer alpha, long bookmark_index, int has_guess, long pagerank_index, float tolerance, int max_iter)
Copyright © 2017. All rights reserved.