/** * Add a dimension to the array. Same as <code>appendDim(size, * null)</code>. * * @param size the size of the desired new dimension. * @see DArray#appendDim(int, String) */ public final void appendDim(int size) { this.appendDim(size, null); }
/** * Gets the <b>start</b> value for the array projection. The parameter * <code>dimension</code> is checked against the instance of the * <code>SDArray</code> for bounds violation. */ public int getStart(int dimension) throws InvalidDimensionException { DArrayDimension d = getDimension(dimension); return (d.getStart()); }
/** * Set the state of this variable's projection. <code>true</code> means * that this variable is part of the current projection as defined by * the current constraint expression, otherwise the current projection * for this variable should be <code>false</code>. * * @param state <code>true</code> if the variable is part of the current * projection, <code>false</code> otherwise. * @param all This parameter has no effect for this type of variable. * @see CEEvaluator */ public void setProject(boolean state, boolean all) { setProjected(state); PrimitiveVector vals = getPrimitiveVector(); ((ServerMethods) (vals.getTemplate())).setProject(state, all); }
if (!isProject()) return; PrimitiveVector pv = getPrimitiveVector(); printDecl(os, space, false, true); os.print(" = ");
void dumpDimension(SDArray var, int i, PrintWriter os) { os.print("["); try { os.print(var.getStart(i)); if (var.getStride(i) != 1) { os.print(":"); os.print(var.getStride(i)); } if (var.getStride(i) != 1 || var.getStop(i) != var.getStart(i)) { os.print(":"); os.print(var.getStop(i)); } } catch (InvalidDimensionException ipe) { os.print('?'); } os.print("]"); }
PrimitiveVector vals = getPrimitiveVector(); if (!isRead()) read(dataset, specialO);
if (!((SDArray) arrayVar).isProject()) return false; DArrayDimension mapDim = mapArray.getFirstDimension(); if (mapArray.isProject()) { // This map vector better be projected! valid = !mapArray.isProject();
void dumpPath(List<BaseType> path, PrintWriter os) { for (int i = 0; i < path.size(); i++) { BaseType bt = path.get(i); if (i > 0) os.print('.'); os.print(bt.getEncodedName()); if (bt.getParent() instanceof SDArray // && !iswholevariable(bt.getParent()) ) { SDArray sa = (SDArray) bt.getParent(); if (!sa.isProject()) continue; for (int j = 0; j < sa.numDimensions(); j++) { dumpDimension(sa, j, os); } } if (bt.getParent() instanceof SDGrid) { SDGrid sg = (SDGrid) bt.getParent(); } } }
if (constrained && !isProject()) return;
Enumeration eSDA = SDA.getDimensions(); while (eSDA.hasMoreElements()) { DArrayDimension dad = (DArrayDimension) eSDA.nextElement(); Enumeration eSDA = sdgA.getDimensions(); while (eSDA.hasMoreElements()) { DArrayDimension dad = (DArrayDimension) eSDA.nextElement();
if (constrained && !isProject()) return;
/** * Gets the <b>stride</b> value for the array projection. The parameter * <code>dimension</code> is checked against the instance of the * <code>SDArray</code> for bounds violation. */ public int getStride(int dimension) throws InvalidDimensionException { DArrayDimension d = getDimension(dimension); return (d.getStride()); }
/** * Gets the <b>stop</b> value for the array projection. The parameter * <code>dimension</code> is checked against the instance of the * <code>SDArray</code> for bounds violation. */ public int getStop(int dimension) throws InvalidDimensionException { DArrayDimension d = getDimension(dimension); return (d.getStop()); }
/** * Set the projection information for this dimension. The * <code>DArrayDimension</code> associated with the * <code>dimension</code> specified is retrieved and the * <code>start</code> <code>stride</code> and <code>stop</code> * parameters are passed to its <code>setProjection()</code> method. * * @param dimension The dimension that is to be modified. * @param start The starting point for the projection of this * <code>DArrayDimension</code>. * @param stride The size of the stride for the projection of this * <code>DArrayDimension</code>. * @param stop The stopping point for the projection of this * <code>DArrayDimension</code>. * @see DArray * @see DArrayDimension */ public void setProjection(int dimension, int start, int stride, int stop) throws InvalidDimensionException { DArrayDimension d = getDimension(dimension); d.setProjection(start, stride, stop); }