当前位置: 首页>>代码示例>>Java>>正文


Java DataInput.readDouble方法代码示例

本文整理汇总了Java中java.io.DataInput.readDouble方法的典型用法代码示例。如果您正苦于以下问题:Java DataInput.readDouble方法的具体用法?Java DataInput.readDouble怎么用?Java DataInput.readDouble使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.io.DataInput的用法示例。


在下文中一共展示了DataInput.readDouble方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: readFields

import java.io.DataInput; //导入方法依赖的package包/类
@Override
public void readFields(DataInput in, Model m) throws IOException {
    input = m.lookupNeuron(in.readInt());
    output = m.lookupNeuron(in.readInt());
    inputNode = m.lookupNodeProvider(in.readInt());

    key = lookupKey(Key.read(in, m));

    weight = in.readDouble();
    bias = in.readDouble();

    isConjunction = in.readBoolean();

    if(in.readBoolean()) {
        meta = new MetaSynapse();
        meta.readFields(in, m);
    }
}
 
开发者ID:aika-algorithm,项目名称:aika,代码行数:19,代码来源:Synapse.java

示例2: getDataPoint

import java.io.DataInput; //导入方法依赖的package包/类
@Override
public DataPoint getDataPoint(long timestamp, DataInput buffer) throws IOException
{
	double real = buffer.readDouble();
	double imaginary = buffer.readDouble();

	return new ComplexDataPoint(timestamp, real, imaginary);
}
 
开发者ID:quqiangsheng,项目名称:abhot,代码行数:9,代码来源:ComplexDataPointFactory.java

示例3: readPrimitiveDouble

import java.io.DataInput; //导入方法依赖的package包/类
/**
 * Reads a primitive <code>double</code> from a <code>DataInput</code>.
 *
 * @throws IOException A problem occurs while reading from <code>in</code>
 * @see DataInput#readDouble
 * @since GemFire 5.1
 */
public static double readPrimitiveDouble(DataInput in) throws IOException {
  InternalDataSerializer.checkIn(in);

  double value = in.readDouble();
  if (logger.isTraceEnabled(LogMarker.SERIALIZER)) {
    logger.trace(LogMarker.SERIALIZER, "Read Double {}", value);
  }
  return value;
}
 
开发者ID:ampool,项目名称:monarch,代码行数:17,代码来源:DataSerializer.java

示例4: readFields

import java.io.DataInput; //导入方法依赖的package包/类
public void readFields(DataInput dataInput) throws IOException {
    this.m = dataInput.readInt();
    this.n = dataInput.readInt();
    this.topic = dataInput.readInt();
    this.probability = dataInput.readDouble();
    this.matrixKind = dataInput.readUTF();
}
 
开发者ID:huyang1,项目名称:LDA,代码行数:8,代码来源:twoDimensionIndexWritable.java

示例5: readDatum

import java.io.DataInput; //导入方法依赖的package包/类
/**
 * Reads a single datum in non-sparse representation of the given type and returns it as a
 * double.
 */
private final double readDatum(final DataInput in, final ColumnType columnType) throws IOException {
	switch (columnType) {
		case DOUBLE:
			return in.readDouble();
		case INTEGER:
			int iValue = in.readInt();
			if (iValue == Integer.MIN_VALUE + 1) {
				boolean isMissing = in.readBoolean();
				if (isMissing) {
					return Double.NaN;
				} else {
					return iValue;
				}
			} else {
				return iValue;
			}
		case NOMINAL_BYTE:
			byte bValue = in.readByte();
			if (bValue == -1) {
				return Double.NaN;
			} else {
				return bValue;
			}
		case NOMINAL_INTEGER:
			iValue = in.readInt();
			if (iValue == -1) {
				return Double.NaN;
			} else {
				return iValue;
			}
		case NOMINAL_SHORT:
			short sValue = in.readShort();
			if (sValue == -1) {
				return Double.NaN;
			} else {
				return sValue;
			}
		default:
			// cannot happen
			throw new RuntimeException("Illegal type: " + columnType);
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:47,代码来源:ExampleSetToStream.java

示例6: read

import java.io.DataInput; //导入方法依赖的package包/类
@Override
public void read(DataInput stream) throws Exception{
    this.data = stream.readDouble();
}
 
开发者ID:RockBottomGame,项目名称:API,代码行数:5,代码来源:PartDouble.java

示例7: read

import java.io.DataInput; //导入方法依赖的package包/类
void read(DataInput input, int depth, NBTSizeTracker sizeTracker) throws IOException
{
    sizeTracker.read(128L);
    this.data = input.readDouble();
}
 
开发者ID:F1r3w477,项目名称:CustomWorldGen,代码行数:6,代码来源:NBTTagDouble.java

示例8: readFields

import java.io.DataInput; //导入方法依赖的package包/类
@Override
public void readFields(DataInput in) throws IOException {
  value = in.readDouble();
}
 
开发者ID:naver,项目名称:hadoop,代码行数:5,代码来源:DoubleWritable.java

示例9: readDoubleArray

import java.io.DataInput; //导入方法依赖的package包/类
private void readDoubleArray(DataInput in) throws IOException {
  double[] v = (double[]) value;
  for (int i = 0; i < length; i++)
    v[i] = in.readDouble(); 
}
 
开发者ID:nucypher,项目名称:hadoop-oss,代码行数:6,代码来源:ArrayPrimitiveWritable.java

示例10: readStream

import java.io.DataInput; //导入方法依赖的package包/类
@Override
public Double readStream(final DataInput data)
        throws IOException
{
    return data.readDouble();
}
 
开发者ID:Leviathan-Studio,项目名称:MineIDE,代码行数:7,代码来源:DataTypeList.java

示例11: read

import java.io.DataInput; //导入方法依赖的package包/类
@Override
public void read(DataInput input) throws IOException {
    super.value = input.readDouble();
}
 
开发者ID:McMoonLakeDev,项目名称:MoonLakeNBT,代码行数:5,代码来源:NBTTagDouble.java

示例12: ConstantPool

import java.io.DataInput; //导入方法依赖的package包/类
ConstantPool(DataInput in) throws IOException {
    int count = in.readUnsignedShort();
    pool = new Entry[count];

    for (int i = 1; i < count; i++) {
        int tag = in.readUnsignedByte();
        switch (tag) {

            case CONSTANT_Utf8:
                String svalue = in.readUTF();
                pool[i] = new ValueEntry(tag, svalue);
                break;

            case CONSTANT_Class:
            case CONSTANT_Package:
            case CONSTANT_Module:
            case CONSTANT_String:
                int index = in.readUnsignedShort();
                pool[i] = new IndexEntry(tag, index);
                break;

            case CONSTANT_Double:
                double dvalue = in.readDouble();
                pool[i] = new ValueEntry(tag, dvalue);
                i++;
                break;

            case CONSTANT_Fieldref:
            case CONSTANT_InterfaceMethodref:
            case CONSTANT_Methodref:
            case CONSTANT_InvokeDynamic:
            case CONSTANT_NameAndType:
                int index1 = in.readUnsignedShort();
                int index2 = in.readUnsignedShort();
                pool[i] = new Index2Entry(tag, index1, index2);
                break;

            case CONSTANT_MethodHandle:
                int refKind = in.readUnsignedByte();
                index = in.readUnsignedShort();
                pool[i] = new Index2Entry(tag, refKind, index);
                break;

            case CONSTANT_MethodType:
                index = in.readUnsignedShort();
                pool[i] = new IndexEntry(tag, index);
                break;

            case CONSTANT_Float:
                float fvalue = in.readFloat();
                pool[i] = new ValueEntry(tag, fvalue);
                break;

            case CONSTANT_Integer:
                int ivalue = in.readInt();
                pool[i] = new ValueEntry(tag, ivalue);
                break;

            case CONSTANT_Long:
                long lvalue = in.readLong();
                pool[i] = new ValueEntry(tag, lvalue);
                i++;
                break;

            default:
                throw invalidModuleDescriptor("Bad constant pool entry: "
                                              + i);
        }
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:71,代码来源:ModuleInfo.java

示例13: readFields

import java.io.DataInput; //导入方法依赖的package包/类
@Override
public void readFields(DataInput in) throws IOException {
  this.bytes = new byte[in.readInt()];
  in.readFully(this.bytes);
  weight = in.readDouble();
}
 
开发者ID:naver,项目名称:hadoop,代码行数:7,代码来源:Key.java

示例14: ConstantDouble

import java.io.DataInput; //导入方法依赖的package包/类
/**
 * Initialize instance from file data.
 *
 * @param file Input stream
 * @throws IOException
 */
ConstantDouble(final DataInput file) throws IOException {
    this(file.readDouble());
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:10,代码来源:ConstantDouble.java

示例15: ConstantDouble

import java.io.DataInput; //导入方法依赖的package包/类
/**
 * Initialize instance from file data.
 *
 * @param file Input stream
 * @throws IOException
 */
ConstantDouble(final DataInput file) throws IOException {
    super(Const.CONSTANT_Double);
    this.bytes = file.readDouble();
}
 
开发者ID:sunmingshuai,项目名称:apache-tomcat-7.0.73-with-comment,代码行数:11,代码来源:ConstantDouble.java


注:本文中的java.io.DataInput.readDouble方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。