java.lang.Object
org.jgrapht.nio.graph6.Graph6Sparse6EventDrivenImporter.Parser
- Enclosing class:
Graph6Sparse6EventDrivenImporter
The actual parser. The parser assumes the input is a single line.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
format
-
bytes
private byte[] bytes -
byteIndex
private int byteIndex -
bitIndex
private int bitIndex -
n
private int n
-
-
Constructor Details
-
Parser
Create a new parser.- Parameters:
inputLine
- an input line
-
-
Method Details
-
parse
public void parse() -
readGraph6
- Throws:
ImportException
-
readSparse6
- Throws:
ImportException
-
validateInput
Check whether the g6 or s6 encoding contains any obvious errors- Throws:
ImportException
- in case any error occurs, such as I/O or parse error
-
readNumberOfVertices
Read the number of vertices in the graph- Throws:
ImportException
- in case any error occurs, such as I/O or parse error
-
getBits
Converts the next k bits of data to an integer- Parameters:
k
- number of bits- Returns:
- the next k bits of data represented by an integer
- Throws:
ImportException
-