es.yrbcn.graph.weighted
Class FixedWidthFloatLabel

java.lang.Object
  extended by it.unimi.dsi.webgraph.labelling.AbstractLabel
      extended by es.yrbcn.graph.weighted.AbstractFloatLabel
          extended by es.yrbcn.graph.weighted.FixedWidthFloatLabel
All Implemented Interfaces:
it.unimi.dsi.lang.FlyweightPrototype<Label>, Label

public class FixedWidthFloatLabel
extends AbstractFloatLabel

An integer represented in fixed width. The provided width must be smaller than 32.


Field Summary
 
Fields inherited from class es.yrbcn.graph.weighted.AbstractFloatLabel
key, value
 
Constructor Summary
FixedWidthFloatLabel(String... arg)
           
FixedWidthFloatLabel(String key)
          Creates a new fixed-width int label of value 0.
FixedWidthFloatLabel(String key, float value)
          Creates a new fixed-width float label.
 
Method Summary
 FixedWidthFloatLabel copy()
           
 int fixedWidth()
           
 int fromBitStream(it.unimi.dsi.io.InputBitStream inputBitStream, int sourceUnused)
           
 int toBitStream(it.unimi.dsi.io.OutputBitStream outputBitStream, int sourceUnused)
           
 String toSpec()
           
 String toString()
           
 
Methods inherited from class es.yrbcn.graph.weighted.AbstractFloatLabel
attributeKeys, attributeTypes, equals, get, get, getDouble, getDouble, getFloat, getFloat, getInt, getInt, getLong, getLong, hashCode, wellKnownAttributeKey
 
Methods inherited from class it.unimi.dsi.webgraph.labelling.AbstractLabel
getBoolean, getBoolean, getByte, getByte, getChar, getChar, getShort, getShort
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface it.unimi.dsi.webgraph.labelling.Label
getBoolean, getBoolean, getByte, getByte, getChar, getChar, getShort, getShort
 

Constructor Detail

FixedWidthFloatLabel

public FixedWidthFloatLabel(String key,
                            float value)
Creates a new fixed-width float label.

Parameters:
key - the (only) key of this label.
value - the value of this label.

FixedWidthFloatLabel

public FixedWidthFloatLabel(String key)
Creates a new fixed-width int label of value 0.

Parameters:
key - the (only) key of this label.
width - the label width (in bits).

FixedWidthFloatLabel

public FixedWidthFloatLabel(String... arg)
Method Detail

copy

public FixedWidthFloatLabel copy()

fromBitStream

public int fromBitStream(it.unimi.dsi.io.InputBitStream inputBitStream,
                         int sourceUnused)
                  throws IOException
Throws:
IOException

toBitStream

public int toBitStream(it.unimi.dsi.io.OutputBitStream outputBitStream,
                       int sourceUnused)
                throws IOException
Throws:
IOException

toString

public String toString()
Overrides:
toString in class AbstractFloatLabel

toSpec

public String toSpec()

fixedWidth

public int fixedWidth()