下面列出了java.io.ObjectInput#readDouble ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
/** Read the instance from an input channel.
* @param in input channel
* @exception IOException if the instance cannot be read
*/
@Override
public void readExternal(final ObjectInput in)
throws IOException, ClassNotFoundException {
// read the base class
final double t = readBaseExternal(in);
if (currentState == null) {
currentDerivative = null;
} else {
currentDerivative = new double[currentState.length];
for (int i = 0; i < currentDerivative.length; ++i) {
currentDerivative[i] = in.readDouble();
}
}
// we can now set the interpolated time and state
setInterpolatedTime(t);
}
/** {@inheritDoc} */
@Override
public void readExternal(final ObjectInput in)
throws IOException {
// read the local attributes
yDotKLast = new double[3][];
final int dimension = in.readInt();
yDotKLast[0] = (dimension < 0) ? null : new double[dimension];
yDotKLast[1] = (dimension < 0) ? null : new double[dimension];
yDotKLast[2] = (dimension < 0) ? null : new double[dimension];
for (int i = 0; i < dimension; ++i) {
yDotKLast[0][i] = in.readDouble();
yDotKLast[1][i] = in.readDouble();
yDotKLast[2][i] = in.readDouble();
}
// read the base state
super.readExternal(in);
}
/** {@inheritDoc} */
@Override
public void readExternal(final ObjectInput in)
throws IOException {
// read the local attributes
yDotKLast = new double[3][];
final int dimension = in.readInt();
yDotKLast[0] = (dimension < 0) ? null : new double[dimension];
yDotKLast[1] = (dimension < 0) ? null : new double[dimension];
yDotKLast[2] = (dimension < 0) ? null : new double[dimension];
for (int i = 0; i < dimension; ++i) {
yDotKLast[0][i] = in.readDouble();
yDotKLast[1][i] = in.readDouble();
yDotKLast[2][i] = in.readDouble();
}
// read the base state
super.readExternal(in);
}
/** {@inheritDoc} */
@Override
public void readExternal(final ObjectInput in)
throws IOException {
// read the base class
final double t = readBaseExternal(in);
final int dimension = (currentState == null) ? -1 : currentState.length;
// read the local attributes
final int degree = in.readInt();
resetTables(degree);
currentDegree = degree;
for (int k = 0; k <= currentDegree; ++k) {
for (int l = 0; l < dimension; ++l) {
polynoms[k][l] = in.readDouble();
}
}
// we can now set the interpolated time and state
setInterpolatedTime(t);
}
/** {@inheritDoc} */
@Override
public void readExternal(final ObjectInput in)
throws IOException {
// read the base class
final double t = readBaseExternal(in);
final int dimension = (currentState == null) ? -1 : currentState.length;
// read the local attributes
final int degree = in.readInt();
resetTables(degree);
currentDegree = degree;
for (int k = 0; k <= currentDegree; ++k) {
for (int l = 0; l < dimension; ++l) {
polynoms[k][l] = in.readDouble();
}
}
// we can now set the interpolated time and state
setInterpolatedTime(t);
}
/** {@inheritDoc} */
@Override
public void readExternal(final ObjectInput in)
throws IOException {
// read the local attributes
yDotKLast = new double[3][];
final int dimension = in.readInt();
yDotKLast[0] = (dimension < 0) ? null : new double[dimension];
yDotKLast[1] = (dimension < 0) ? null : new double[dimension];
yDotKLast[2] = (dimension < 0) ? null : new double[dimension];
for (int i = 0; i < dimension; ++i) {
yDotKLast[0][i] = in.readDouble();
yDotKLast[1][i] = in.readDouble();
yDotKLast[2][i] = in.readDouble();
}
// read the base state
super.readExternal(in);
}
/** Read the instance from an input channel.
* @param in input channel
* @exception IOException if the instance cannot be read
*/
@Override
public void readExternal(final ObjectInput in)
throws IOException, ClassNotFoundException {
// read the base class
final double t = readBaseExternal(in);
if (currentState == null) {
currentDerivative = null;
} else {
currentDerivative = new double[currentState.length];
for (int i = 0; i < currentDerivative.length; ++i) {
currentDerivative[i] = in.readDouble();
}
}
// we can now set the interpolated time and state
setInterpolatedTime(t);
}
/** {@inheritDoc} */
@Override
public void readExternal(final ObjectInput in)
throws IOException {
// read the local attributes
yDotKLast = new double[3][];
final int dimension = in.readInt();
yDotKLast[0] = (dimension < 0) ? null : new double[dimension];
yDotKLast[1] = (dimension < 0) ? null : new double[dimension];
yDotKLast[2] = (dimension < 0) ? null : new double[dimension];
for (int i = 0; i < dimension; ++i) {
yDotKLast[0][i] = in.readDouble();
yDotKLast[1][i] = in.readDouble();
yDotKLast[2][i] = in.readDouble();
}
// read the base state
super.readExternal(in);
}
/** {@inheritDoc} */
@Override
public void readExternal(final ObjectInput in)
throws IOException, ClassNotFoundException {
// read the base class
final double t = readBaseExternal(in);
// read the local attributes
scalingH = in.readDouble();
referenceTime = in.readDouble();
final int n = (currentState == null) ? -1 : currentState.length;
final boolean hasScaled = in.readBoolean();
if (hasScaled) {
scaled = new double[n];
for (int j = 0; j < n; ++j) {
scaled[j] = in.readDouble();
}
} else {
scaled = null;
}
final boolean hasNordsieck = in.readBoolean();
if (hasNordsieck) {
nordsieck = (Array2DRowRealMatrix) in.readObject();
} else {
nordsieck = null;
}
if (hasScaled && hasNordsieck) {
// we can now set the interpolated time and state
stateVariation = new double[n];
setInterpolatedTime(t);
} else {
stateVariation = null;
}
}
@Override
public void readExternal(ObjectInput in) throws IOException,
ClassNotFoundException {
length = in.readInt();
self = new double[length];
for (int i = 0; i < length; i++) {
self[i] = in.readDouble();
}
}
/** {@inheritDoc} */
@Override
public void readExternal(final ObjectInput in)
throws IOException {
// read the base class
final double t = readBaseExternal(in);
// read the local attributes
final int n = (currentState == null) ? -1 : currentState.length;
final int kMax = in.readInt();
yDotK = (kMax < 0) ? null : new double[kMax][];
for (int k = 0; k < kMax; ++k) {
yDotK[k] = (n < 0) ? null : new double[n];
for (int i = 0; i < n; ++i) {
yDotK[k][i] = in.readDouble();
}
}
integrator = null;
if (currentState != null) {
// we can now set the interpolated time and state
setInterpolatedTime(t);
} else {
interpolatedTime = t;
}
}
/** {@inheritDoc} */
@Override
public void readExternal(final ObjectInput in)
throws IOException, ClassNotFoundException {
// read the base class
final double t = readBaseExternal(in);
// read the local attributes
final int n = (currentState == null) ? -1 : currentState.length;
if (n < 0) {
previousState = null;
} else {
previousState = new double[n];
for (int i = 0; i < n; ++i) {
previousState[i] = in.readDouble();
}
}
final int kMax = in.readInt();
yDotK = (kMax < 0) ? null : new double[kMax][];
for (int k = 0; k < kMax; ++k) {
yDotK[k] = (n < 0) ? null : new double[n];
for (int i = 0; i < n; ++i) {
yDotK[k][i] = in.readDouble();
}
}
integrator = null;
if (currentState != null) {
// we can now set the interpolated time and state
setInterpolatedTime(t);
} else {
interpolatedTime = t;
}
}
/** {@inheritDoc} */
@Override
public void readExternal(final ObjectInput in)
throws IOException, ClassNotFoundException {
// read the base class
final double t = readBaseExternal(in);
// read the local attributes
scalingH = in.readDouble();
referenceTime = in.readDouble();
final int n = (currentState == null) ? -1 : currentState.length;
final boolean hasScaled = in.readBoolean();
if (hasScaled) {
scaled = new double[n];
for (int j = 0; j < n; ++j) {
scaled[j] = in.readDouble();
}
} else {
scaled = null;
}
final boolean hasNordsieck = in.readBoolean();
if (hasNordsieck) {
nordsieck = (Array2DRowRealMatrix) in.readObject();
} else {
nordsieck = null;
}
if (hasScaled && hasNordsieck) {
// we can now set the interpolated time and state
stateVariation = new double[n];
setInterpolatedTime(t);
} else {
stateVariation = null;
}
}
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
oX = in.readDouble();
oY = in.readDouble();
oZ = in.readDouble();
dX = in.readDouble();
dY = in.readDouble();
dZ = in.readDouble();
}
public void readExternal(ObjectInput in) throws IOException,
ClassNotFoundException {
x = in.readDouble();
y = in.readDouble();
z = in.readDouble();
w = in.readDouble();
}
/** {@inheritDoc} */
@Override
public void readExternal(final ObjectInput in)
throws IOException, ClassNotFoundException {
// read the base class
final double t = readBaseExternal(in);
// read the local attributes
scalingH = in.readDouble();
referenceTime = in.readDouble();
final int n = (currentState == null) ? -1 : currentState.length;
final boolean hasScaled = in.readBoolean();
if (hasScaled) {
scaled = new double[n];
for (int j = 0; j < n; ++j) {
scaled[j] = in.readDouble();
}
} else {
scaled = null;
}
final boolean hasNordsieck = in.readBoolean();
if (hasNordsieck) {
nordsieck = (Array2DRowRealMatrix) in.readObject();
} else {
nordsieck = null;
}
if (hasScaled && hasNordsieck) {
// we can now set the interpolated time and state
stateVariation = new double[n];
setInterpolatedTime(t);
} else {
stateVariation = null;
}
}
/** Read the base state of the instance.
* This method does <strong>neither</strong> set the interpolated
* time nor state. It is up to the derived class to reset it
* properly calling the {@link #setInterpolatedTime} method later,
* once all rest of the object state has been set up properly.
* @param in stream where to read the state from
* @return interpolated time be set later by the caller
* @exception IOException in case of read error
*/
protected double readBaseExternal(final ObjectInput in)
throws IOException {
final int dimension = in.readInt();
globalPreviousTime = in.readDouble();
globalCurrentTime = in.readDouble();
softPreviousTime = in.readDouble();
softCurrentTime = in.readDouble();
h = in.readDouble();
forward = in.readBoolean();
dirtyState = true;
if (dimension < 0) {
currentState = null;
} else {
currentState = new double[dimension];
for (int i = 0; i < currentState.length; ++i) {
currentState[i] = in.readDouble();
}
}
// we do NOT handle the interpolated time and state here
interpolatedTime = Double.NaN;
interpolatedState = (dimension < 0) ? null : new double[dimension];
interpolatedDerivatives = (dimension < 0) ? null : new double[dimension];
finalized = true;
return in.readDouble();
}
/** {@inheritDoc} */
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
lastUpdateTime = in.readLong();
maxActiveJobs = in.readInt();
curActiveJobs = in.readInt();
avgActiveJobs = in.readFloat();
maxWaitingJobs = in.readInt();
curWaitingJobs = in.readInt();
avgWaitingJobs = in.readFloat();
maxRejectedJobs = in.readInt();
curRejectedJobs = in.readInt();
avgRejectedJobs = in.readFloat();
maxCancelledJobs = in.readInt();
curCancelledJobs = in.readInt();
avgCancelledJobs = in.readFloat();
totalRejectedJobs = in.readInt();
totalCancelledJobs = in.readInt();
totalExecutedJobs = in.readInt();
maxJobWaitTime = in.readLong();
curJobWaitTime = in.readLong();
avgJobWaitTime = in.readDouble();
maxJobExecTime = in.readLong();
curJobExecTime = in.readLong();
avgJobExecTime = in.readDouble();
totalExecTasks = in.readInt();
totalIdleTime = in.readLong();
curIdleTime = in.readLong();
availProcs = in.readInt();
load = in.readDouble();
avgLoad = in.readDouble();
gcLoad = in.readDouble();
heapInit = in.readLong();
heapUsed = in.readLong();
heapCommitted = in.readLong();
heapMax = in.readLong();
nonHeapInit = in.readLong();
nonHeapUsed = in.readLong();
nonHeapCommitted = in.readLong();
nonHeapMax = in.readLong();
upTime = in.readLong();
startTime = in.readLong();
nodeStartTime = in.readLong();
threadCnt = in.readInt();
peakThreadCnt = in.readInt();
startedThreadCnt = in.readLong();
daemonThreadCnt = in.readInt();
fileSysFreeSpace = in.readLong();
fileSysTotalSpace = in.readLong();
fileSysUsableSpace = in.readLong();
lastDataVer = in.readLong();
sentMsgsCnt = in.readInt();
sentBytesCnt = in.readLong();
rcvdMsgsCnt = in.readInt();
rcvdBytesCnt = in.readLong();
}
public void readExternal(ObjectInput in) throws IOException,
ClassNotFoundException {
x = in.readDouble();
y = in.readDouble();
z = in.readDouble();
}
public void readExternal(ObjectInput in) throws IOException {
m00 = in.readDouble();
m01 = in.readDouble();
m10 = in.readDouble();
m11 = in.readDouble();
}