RLPark 1.0.0
Reinforcement Learning Framework in Java

DropBooleanBit.java

Go to the documentation of this file.
00001 package rlpark.plugin.robot.internal.disco.drops;
00002 
00003 
00004 import rlpark.plugin.rltoys.math.ranges.Range;
00005 import rlpark.plugin.robot.internal.disco.datatype.ScalarReader;
00006 import rlpark.plugin.robot.internal.sync.LiteByteBuffer;
00007 
00008 public class DropBooleanBit extends DropData implements ScalarReader {
00009   public DropBooleanBit(String label) {
00010     this(label, -1);
00011   }
00012 
00013   public DropBooleanBit(String label, int index) {
00014     super(label, false, index);
00015   }
00016 
00017   @Override
00018   public DropData clone(String label, int index) {
00019     return new DropBooleanBit(label, index);
00020   }
00021 
00022   @Override
00023   public int getInt(LiteByteBuffer buffer) {
00024     return buffer.get(index);
00025   }
00026 
00027   @Override
00028   public void putData(LiteByteBuffer buffer) {
00029   }
00030 
00031   @Override
00032   public int size() {
00033     return 1;
00034   }
00035 
00036   @Override
00037   public Range range() {
00038     return new Range(0, 1);
00039   }
00040 
00041   @Override
00042   public double getDouble(LiteByteBuffer buffer) {
00043     return getInt(buffer);
00044   }
00045 }
 All Classes Namespaces Files Functions Variables Enumerations
Zephyr
RLPark