Package com.gengoai.graph.io
Interface DefaultEncodersDecoders
-
public interface DefaultEncodersDecoders
Default encoders and decoders.
- Author:
- David B. Bracewell
-
-
Field Summary
Fields Modifier and Type Field Description static String
EDGE_WEIGHT_KEY
Key used to store edge weight
-
Method Summary
Static Methods Modifier and Type Method Description static <V> EdgeDecoder<V>
defaultEdgeDecoder()
Default edge decoder which is aware of edge weights.static <V> EdgeEncoder<V>
defaultEdgeEncoder()
Default edge encoder which encodes the edge weight if the graph is weighted.static <V> VertexDecoder<V>
defaultVertexDecoder(Class<V> vertexClass)
Default vertex decoder which converts the label into to the vertex type.static <V> VertexEncoder<V>
defaultVertexEncoder()
Default vertex encoder which converts the sets the encoded label as the string version of the given vertex.
-
-
-
Field Detail
-
EDGE_WEIGHT_KEY
static final String EDGE_WEIGHT_KEY
Key used to store edge weight- See Also:
- Constant Field Values
-
-
Method Detail
-
defaultVertexEncoder
static <V> VertexEncoder<V> defaultVertexEncoder()
Default vertex encoder which converts the sets the encoded label as the string version of the given vertex.- Type Parameters:
V
- the vertex type- Returns:
- the vertex encoder
-
defaultVertexDecoder
static <V> VertexDecoder<V> defaultVertexDecoder(Class<V> vertexClass)
Default vertex decoder which converts the label into to the vertex type.- Type Parameters:
V
- the vertex type- Parameters:
vertexClass
- the vertex class- Returns:
- the vertex decoder
-
defaultEdgeEncoder
static <V> EdgeEncoder<V> defaultEdgeEncoder()
Default edge encoder which encodes the edge weight if the graph is weighted.- Type Parameters:
V
- the vertex type- Returns:
- the edge encoder
-
defaultEdgeDecoder
static <V> EdgeDecoder<V> defaultEdgeDecoder()
Default edge decoder which is aware of edge weights.- Type Parameters:
V
- the vertex type- Returns:
- the edge decoder
-
-