set rank value for vertex v and add it to the corresponding layer.
           The Layer is created if it is the first vertex with this rank.
321323
def setrank(self,v):
        
        assert self.dag
        r=max([self.grx[x].rank for x in v.N(-1)]+[-1])+1
        self.grx[v].rank=r
        # add it to its layer:
        try:
            self.layers[r].append(v)
        except IndexError:
            assert r==len(self.layers)
            self.layers.append(Layer([v]))
1157902
private void updateVertexProperty(AtlasVertex vertex, String propertyName, String newValue) {
        if (StringUtils.isNotBlank(newValue)) {
            String currValue = vertex.getProperty(propertyName, String.class);

            if (!StringUtils.equals(currValue, newValue)) {
                vertex.setProperty(propertyName, newValue);
            }
        }
    }
815195
def add_value(self, value, index_point):
        """"""
        if index_point not in self.index:
            self.values.append(value)
            self.index.append(index_point)
1296666
public void addAll(Vertex vtx) {
        if (head == null) {
            head = vtx;
        } else {
            tail.next = vtx;
        }
        vtx.prev = tail;
        while (vtx.next != null) {
            vtx = vtx.next;
        }
        tail = vtx;
    }
940789
public void setVariable(ElemVariable v)
  {

    if (null == m_topLevelVariables)
      m_topLevelVariables = new Vector();

    m_topLevelVariables.addElement(v);
  }
509281
def make_original_face(num_edges)
      num_edges_check(num_edges)
      # Make the vertices
      vert_ref = Array.new(num_edges) {Vertex.new}
      edge_ref = []

      # Connect each vertex to the one before it (including the first one :)
      (num_edges).times do |vert_id|
        edge_ref << make_connection(vert_ref[vert_id - 1], vert_ref[vert_id])
      end

      # Make the face and store it
      face = add_face(edge_ref)
      # Store the new vertices
      @vertices += vert_ref
      # Store the new edges
      @edges += edge_ref

      face
    end
890835
public void setValue(float v) {
    if (VariableAssignment_Type.featOkTst && ((VariableAssignment_Type)jcasType).casFeat_value == null)
      jcasType.jcas.throwFeatMissing("value", "ch.epfl.bbp.uima.types.VariableAssignment");
    jcasType.ll_cas.ll_setFloatValue(addr, ((VariableAssignment_Type)jcasType).casFeatCode_value, v);}
1100738
public static void addProperty(AtlasVertex vertex, String propertyName, Object value) {
        String actualPropertyName = GraphHelper.encodePropertyKey(propertyName);

        if (LOG.isDebugEnabled()) {
            LOG.debug("Adding property {} = \"{}\" to vertex {}", actualPropertyName, value, string(vertex));
        }

        vertex.addProperty(actualPropertyName, value);
    }
468678
function setValueV2a( gl, v ) {

	var cache = this.cache;
	var data = flatten( v, this.size, 2 );

	if ( arraysEqual( cache, data ) ) return;

	gl.uniform2fv( this.addr, data );

	this.updateCache( data );

}
144043
def go_in(self, vertex):
        
        if self.vertex_in:
            self.vertex_in.edges_in.remove(self)
        self.vertex_in = vertex
        vertex.edges_in.add(self)
961297
def add(self, value):
        
        ind = int(self._ind % self.shape)
        self._pos = self._ind % self.shape
        self._values[ind] = value
        if self._ind < self.shape:
            self._ind += 1  # fast fill
        else:
            self._ind += self._splitValue
            self._splitPos += self._splitValue
        self._cached = False
362157
def add_vertex(self, vertex, **attr):
        
        self.vertices[vertex] = []
        if attr:
            self.nodes[vertex] = attr
320717
def _set_value(self, new_value):
        """"""

        if self.min_value is not None and new_value < self.min_value:

            raise SettingOutOfBounds(
                "Trying to set parameter {0} = {1}, which is less than the minimum allowed {2}".format(
                    self.name, new_value, self.min_value))

        if self.max_value is not None and new_value > self.max_value:
            raise SettingOutOfBounds(
                "Trying to set parameter {0} = {1}, which is more than the maximum allowed {2}".format(
                    self.name, new_value, self.max_value))

        # Issue a warning if there is an auxiliary variable, as the setting does not have any effect
        if self.has_auxiliary_variable():

            with warnings.catch_warnings():

                warnings.simplefilter("always", RuntimeWarning)

                warnings.warn("You are trying to assign to a parameter which is either linked or "
                              "has auxiliary variables. The assignment has no effect.", RuntimeWarning)

        # Save the value as a pure floating point to avoid the overhead of the astropy.units machinery when
        # not needed

        if self._transformation is None:

            new_internal_value = new_value

        else:

            new_internal_value = self._transformation.forward(new_value)

        # If the parameter has changed, update its value and call the callbacks if needed

        if new_internal_value != self._internal_value:

            # Update
            self._internal_value = new_internal_value

            # Call the callbacks (if any)
            for callback in self._callbacks:

                try:

                    callback(self)

                except:

                    raise NotCallableOrErrorInCall("Could not call callback for parameter %s" % self.name)
1355679
def add_edge (u, v)
      add_vertex(u)                         # ensure key
      add_vertex(v)                         # ensure key
      basic_add_edge(u, v)
    end
1234578
function setValueT1( gl, v, renderer ) {

	var cache = this.cache;
	var unit = renderer.allocTextureUnit();

	if ( cache[ 0 ] !== unit ) {

		gl.uniform1i( this.addr, unit );
		cache[ 0 ] = unit;

	}

	renderer.setTexture2D( v || emptyTexture, unit );

}
329724
def _insert_layer_after(self, layer_idx, new_layer, new_keras_layer):
        
        # reminder: new_keras_layer is not part of the original Keras network,
        # so it's input / output blob information is missing. It serves only as
        # a parameter holder.
        layer = self.layer_list[layer_idx]
        self.layer_list.insert(layer_idx+1, new_layer)
        self.keras_layer_map[new_layer] = new_keras_layer
        successors = self.get_successors(layer)
        # add edge layer -> new_layer
        self._add_edge(layer, new_layer)
        # add edges new_layer -> layer_successor, remove layer -> successor
        for succ in successors:
            self._add_edge(new_layer, succ)
            self._remove_edge(layer, succ)
342402
private void setDrawWithLayer(View v, boolean drawWithLayer) {
		if (isHardwareAccelerated()) {
			if (v.getLayerType() != LAYER_TYPE_HARDWARE && drawWithLayer) {
				v.setLayerType(LAYER_TYPE_HARDWARE, null);
			} else if (v.getLayerType() != LAYER_TYPE_NONE && !drawWithLayer) {
				v.setLayerType(LAYER_TYPE_NONE, null);
			}
		}
	}