Helper method which sets up an iteration with the given vertex value.

@param iteration
975921
private void setUpIteration(DeltaIteration<?, ?> iteration) {

		// set up the iteration operator
		if (this.configuration != null) {

			iteration.name(this.configuration.getName("Vertex-centric iteration (" + computeFunction + ")"));
			iteration.parallelism(this.configuration.getParallelism());
			iteration.setSolutionSetUnManaged(this.configuration.isSolutionSetUnmanagedMemory());

			// register all aggregators
			for (Map.Entry<String, Aggregator<?>> entry : this.configuration.getAggregators().entrySet()) {
				iteration.registerAggregator(entry.getKey(), entry.getValue());
			}
		}
		else {
			// no configuration provided; set default name
			iteration.name("Vertex-centric iteration (" + computeFunction + ")");
		}
	}
886616
function( program ){
    var gl = this.gl;
    gl.bindBuffer( TGT, this.buffer );

    for (var i = 0; i < this.attribs.length; i++) {
      var attrib = this.attribs[i];

      if( program[attrib.name] !== undefined ){
        var aLocation = program[attrib.name]();
        gl.enableVertexAttribArray( aLocation );
        gl.vertexAttribPointer( aLocation,
                                attrib.size,
                                attrib.type,
                                attrib.normalize,
                                this.stride,
                                attrib.offset
                              );
      }

    }
  }
8835
public void updateExecutionState(final ExecutionState executionState) {

		final Iterator<ExecutionVertex> it = this.vertices.iterator();
		while (it.hasNext()) {
			final ExecutionVertex vertex = it.next();
			vertex.updateExecutionState(executionState);
		}

	}
627771
public final void build(GraphIterator<ST, PT> iterator, SubGraphBuildListener<ST, PT> listener) {
		assert iterator != null;
		final Set<ComparableWeakReference<PT>> reachedPoints = new TreeSet<>();
		GraphIterationElement<ST, PT> element;
		ST segment;
		PT point;
		PT firstPoint = null;

		this.parentGraph = new WeakReference<>(iterator.getGraph());
		this.segments.clear();
		this.pointNumber = 0;
		this.terminalPoints.clear();

		while (iterator.hasNext()) {
			element = iterator.nextElement();
			point = element.getPoint();
			segment = element.getSegment();

			// First reached segment
			if (this.segments.isEmpty()) {
				firstPoint = point;
			}

			this.segments.add(segment);
			if (listener != null) {
				listener.segmentAdded(this, element);
			}

			// Register terminal points
			point = segment.getOtherSidePoint(point);
			final ComparableWeakReference<PT> ref = new ComparableWeakReference<>(point);
			if (element.isTerminalSegment()) {
				if (!reachedPoints.contains(ref)) {
					this.terminalPoints.add(ref);
					if (listener != null) {
						listener.terminalPointReached(this, point, segment);
					}
				}
			} else {
				this.terminalPoints.remove(ref);
				reachedPoints.add(ref);
				if (listener != null) {
					listener.nonTerminalPointReached(this, point, segment);
				}
			}
		}

		if (firstPoint != null) {
			final ComparableWeakReference<PT> ref = new ComparableWeakReference<>(firstPoint);
			if (!reachedPoints.contains(ref)) {
				this.terminalPoints.add(ref);
			}
		}

		this.pointNumber = this.terminalPoints.size() + reachedPoints.size();

		reachedPoints.clear();
	}
250046
public void setAll(double value) {
        VectorIterator it = iterator();

        while (it.hasNext()) {
            it.next();
            it.set(value);
        }
    }
1148865
public static IterationBuilderOver over(Class<? extends WindupVertexFrame> sourceType, String source)
    {
        Iteration iterationImpl = new Iteration(new TypedNamedFramesSelector(sourceType, source));
        iterationImpl.setPayloadManager(new TypedNamedIterationPayloadManager(sourceType,
                    singleVariableIterationName(source)));
        return iterationImpl;
    }
1010067
public void copy(VertexData data) {
        clear();
        indices.addAll(data.indices);
        final TIntObjectIterator<VertexAttribute> iterator = data.attributes.iterator();
        while (iterator.hasNext()) {
            iterator.advance();
            attributes.put(iterator.key(), iterator.value().clone());
        }
        nameToIndex.putAll(data.nameToIndex);
    }
727758
public void setVertexArray(VertexArray vertexArray) {
        if (vertexArray == null) {
            throw new IllegalArgumentException("Vertex array cannot be null");
        }
        vertexArray.checkCreated();
        this.vertexArray = vertexArray;
    }
202782
private Iteration<Statement, QueryEvaluationException> toStatementIteration(TupleQueryResult iter, final Resource subj, final URI pred, final Value obj) {
        return new ConvertingIteration<BindingSet, Statement, QueryEvaluationException>(iter) {
            @Override
            protected Statement convert(BindingSet b) throws QueryEvaluationException {
                Resource s = subj==null ? (Resource)b.getValue("s") : subj;
                URI p = pred==null ? (URI)b.getValue("p") : pred;
                Value o = obj==null ? b.getValue("o") : obj;
                URI ctx = (URI)b.getValue("ctx");
                if (ctx.stringValue().equals(DEFAULT_GRAPH_URI)) {
                    ctx = null;
                }
                return getValueFactory().createStatement(s, p, o, ctx);
            }
        };
    }
117533
private void iterations() {
        int iterationCount = 0;
        while ((clusteringStrategy.getTerminationCondition() != null
                        && !clusteringStrategy.getTerminationCondition().isSatisfied(iterationHistory))
                        || iterationHistory.getMostRecentIterationInfo().isStrategyApplied()) {
            currentIteration++;
            removePoints();
            classifyPoints();
            applyClusteringStrategy();
            log.trace("Completed clustering iteration {}", ++iterationCount);
        }
    }
391266
@Override
	public <V> Iterator<VertexProperty<V>> properties(String... propertyKeys) {
        ArrayList<VertexProperty<V>> ans = new ArrayList<VertexProperty<V>>();

        if (propertyKeys.length == 0) {
        	if (this.properties == null) return Collections.emptyIterator();
        	propertyKeys = this.properties.getPropertyKeys();
        }

        for (String key : propertyKeys) {
        	VertexProperty<V> prop = property(key);
            if (prop.isPresent()) ans.add(prop);
        }
        return ans.iterator();
	}
875024
def p_iteration_statement_4(self, p):
        
        p[0] = self.asttypes.ForIn(item=p[3], iterable=p[5], statement=p[7])
        p[0].setpos(p)
539311
def set_for_computations(self, value):
        
        if self.mesh._compute_at_vertices:
            self._vertices = value
        else:
            self._centers = value
862449
public void impute(double[][] data, int maxIter) throws MissingValueImputationException {
        if (maxIter < 1) {
            throw new IllegalArgumentException("Invalid maximum number of iterations: " + maxIter);
        }

        int[] count = new int[data[0].length];
        for (int i = 0; i < data.length; i++) {
            int n = 0;
            for (int j = 0; j < data[i].length; j++) {
                if (Double.isNaN(data[i][j])) {
                    n++;
                    count[j]++;
                }
            }

            if (n == data[i].length) {
                throw new MissingValueImputationException("The whole row " + i + " is missing");
            }
        }

        for (int i = 0; i < data[0].length; i++) {
            if (count[i] == data.length) {
                throw new MissingValueImputationException("The whole column " + i + " is missing");
            }
        }

        double[][] full = new double[data.length][];
        for (int i = 0; i < full.length; i++) {
            full[i] = data[i].clone();
        }

        KMeansImputation.columnAverageImpute(full);

        for (int iter = 0; iter < maxIter; iter++) {
            svdImpute(data, full);
        }

        for (int i = 0; i < data.length; i++) {
            System.arraycopy(full[i], 0, data[i], 0, data[i].length);
        }
    }
986012
@Override
    public IterationBuilderVar as(Class<? extends WindupVertexFrame> varType, String var)
    {
        setPayloadManager(new TypedNamedIterationPayloadManager(varType, var));
        return this;
    }
1238977
public void setRow(int i, double value) {
        VectorIterator it = iteratorOfRow(i);

        while (it.hasNext()) {
            it.next();
            it.set(value);
        }
    }
312919
private void setVertex(Geometry geom, GeometryIndex index, Coordinate coordinate)
			throws GeometryIndexNotFoundException {
		if (index.hasChild() && geom.getGeometries() != null && geom.getGeometries().length > index.getValue()) {
			setVertex(geom.getGeometries()[index.getValue()], index.getChild(), coordinate);
		} else if (index.getType() == GeometryIndexType.TYPE_VERTEX && geom.getCoordinates() != null
				&& geom.getCoordinates().length > index.getValue()) {
			if (geom.getGeometryType().equals(Geometry.LINEAR_RING)) {
				// In case of a closed ring, the last vertex is not allowed to be moved:
				if ((geom.getCoordinates().length - 1) > index.getValue()) {
					geom.getCoordinates()[index.getValue()] = coordinate;
					if (index.getValue() == 0) {
						// In case of closed ring, keep last coordinate equal to the first:
						geom.getCoordinates()[geom.getCoordinates().length - 1] = new Coordinate(coordinate);
					}
				} else {
					throw new GeometryIndexNotFoundException("Can't move closing vertex of a LinearRing, "
							+ "move index=0 instead.");
				}
			} else {
				geom.getCoordinates()[index.getValue()] = coordinate;
			}
		} else {
			throw new GeometryIndexNotFoundException("Could not match index with given geometry");
		}
	}