Gets a tensor of indicator variables for the old key values in this. The
returned tensor has value 1 for all keys in this, and 0 for all other keys.

@return
480103
public SparseTensor getOldKeyIndicatorTensor() {
    double[] values = new double[oldKeyNums.length];
    Arrays.fill(values, 1.0);
    return SparseTensor.fromUnorderedKeyValues(oldTensor.getDimensionNumbers(), 
        oldTensor.getDimensionSizes(), oldKeyNums, values);
  }
403307
public org.tensorflow.framework.TensorShapeProto getTensorShape() {
    return tensorShape_ == null ? org.tensorflow.framework.TensorShapeProto.getDefaultInstance() : tensorShape_;
  }
452307
@Nonnull
  @ReturnsMutableCopy
  public Matrix getD ()
  {
    final Matrix aNewMatrix = new Matrix (m_nDim, m_nDim);
    final double [] [] aNewArray = aNewMatrix.internalGetArray ();
    for (int nRow = 0; nRow < m_nDim; nRow++)
    {
      final double [] aDstRow = aNewArray[nRow];
      Arrays.fill (aDstRow, 0.0);
      aDstRow[nRow] = m_aEVd[nRow];

      final double dEVe = m_aEVe[nRow];
      if (dEVe > 0)
        aDstRow[nRow + 1] = dEVe;
      else
        if (dEVe < 0)
          aDstRow[nRow - 1] = dEVe;
    }
    return aNewMatrix;
  }
1129782
public VariableNumMap getFirstVariables(int numVariables) {
    int numToCopy = Math.min(numVariables, nums.length);
    int[] newNums = Arrays.copyOf(nums, numToCopy);
    String[] newNames = Arrays.copyOf(names, numToCopy);
    Variable[] newVars = Arrays.copyOf(vars, numToCopy);
    return VariableNumMap.fromSortedArrays(newNums, newNames, newVars);
  }
326428
public INDArray ndArrayFromTensor(TF_Tensor tensor) {
        int rank = TF_NumDims(tensor);

        int[] ndShape;
        if (rank == 0) {
            // scalar
            ndShape = new int[] { 1 };
        } else {
            ndShape = new int[rank];
            for (int i = 0; i < ndShape.length; i++) {
                ndShape[i] = (int) TF_Dim(tensor,i);
            }
        }

        int tfType = TF_TensorType(tensor);
        DataType nd4jType = typeFor(tfType);

        int length = ArrayUtil.prod(ndShape);
        INDArray array;
        if (nd4jType == DataType.UTF8) {
            String[] strings = new String[length];
            BytePointer data = new BytePointer(TF_TensorData(tensor)).capacity(TF_TensorByteSize(tensor));
            BytePointer str = new BytePointer((Pointer)null);
            SizeTPointer size = new SizeTPointer(1);
            TF_Status status = TF_NewStatus();
            for (int i = 0; i < length; i++) {
                long offset = data.position(8 * i).getLong();
                TF_StringDecode(data.position(8 * length + offset), data.capacity() - data.position(), str, size, status);
                if (TF_GetCode(status) != TF_OK) {
                    throw new IllegalStateException("ERROR: Unable to convert tensor " + TF_Message(status).getString());
                }
                strings[i] = str.position(0).capacity(size.get()).getString();
            }
            TF_DeleteStatus(status);
            array = Nd4j.create(strings);
        } else {
            Pointer pointer = TF_TensorData(tensor).capacity(length);
            Indexer indexer = indexerForType(nd4jType,pointer);
            DataBuffer d = Nd4j.createBuffer(indexer.pointer(),nd4jType,length,indexer);
            array = Nd4j.create(d,ndShape);
        }
        Nd4j.getAffinityManager().tagLocation(array, AffinityManager.Location.HOST);
        return array;
    }
1247834
public Map<String, Object> getVariables() {
    final HashMap<String, Object> map = new HashMap<String, Object>();
    if (inherited != null)
      map.putAll(inherited.getVariables());
    if (variables != null)
      map.putAll(variables);
    return map;
  }
689709
private int getPoorestClassifierIndex() {
		int minIndex = 0;
		
		for (int i = 1; i < this.weights.length; i++) {
			if(this.weights[i][0] < this.weights[minIndex][0]){
				minIndex = i;
			}
		}
		
		return minIndex;
	}
1329269
public java.util.List<? extends org.tensorflow.framework.Summary.ValueOrBuilder> 
      getValueOrBuilderList() {
    return value_;
  }
918845
public org.tensorflow.framework.AttrValue.ListValue getList() {
    if (valueCase_ == 1) {
       return (org.tensorflow.framework.AttrValue.ListValue) value_;
    }
    return org.tensorflow.framework.AttrValue.ListValue.getDefaultInstance();
  }
585029
public HashMap<Variable,Object> chooseValues() {
		MultiVariable mv = (MultiVariable)myVariable;
		Variable[] internalVars = mv.getInternalVariables();
		HashMap<Variable,Object> values = new HashMap<Variable,Object>();
		for (Variable v: internalVars) {
			if (v instanceof MultiVariable) {
				MultiVariable nestedMv = (MultiVariable)v;
				MultiDomain nestedMd = nestedMv.getDomain();
				HashMap<Variable,Object> nested = nestedMd.chooseValues();
				for (Entry<Variable,Object> e : nested.entrySet()) {
					values.put(e.getKey(), e.getValue());
				}
			}
			else {
				values.put(v,v.getDomain().chooseValue());
			}
		}
		return values;
	}
561597
int[] getKeys()
    {
        Set<Integer> keySet = map.keySet();
        int keys[] = new int[keySet.size()];
        int index = 0;
        for (Integer key : keySet)
        {
            keys[index] = key;
            index++;
        }
        return keys;
    }
564330
public final int getNumberOfPossibleAssignments() {
    int[] sizes = getVariableSizes();
    int numAssignments = 1;
    for (int i = 0; i < sizes.length; i++) {
      numAssignments *= sizes[i];
    }
    return numAssignments;
  }
1055196
private Tensor getMsgs(VarTensor[] inMsgs, int tf) {
        Algebra s = inMsgs[0].getAlgebra();
        EdgeScores es = new EdgeScores(n, s.zero());
        for (VarTensor inMsg : inMsgs) {
            LinkVar link = (LinkVar) inMsg.getVars().get(0);            
            double val = inMsg.getValue(tf);
            es.setScore(link.getParent(), link.getChild(), val);
        }
        return es.toTensor(s);
    }
1304227
public int[] getElementIndices() {
        if (indices != null)
            return indices;
        Integer[] objIndices = indexToValue.keySet().toArray(new Integer[0]);
        indices = new int[objIndices.length];
        for (int i = 0; i < objIndices.length; ++i)
            indices[i] = objIndices[i].intValue();
        // sort the indices
        Arrays.sort(indices);
        return indices;
    }
368232
@Override
    public float[] getValues() {
        if (used == values.length)
            return values;

        float[] tmpValues = new float[used];
        for (int i = 0; i < used; i++) {
        	tmpValues[i] = values[i];
        }
        return tmpValues;
    }
1131912
public ConfusionMatrix getTransposedMatrix()
    {
        ConfusionMatrix result = new ConfusionMatrix();

        for (Map.Entry<String, Map<String, Integer>> gold : this.map.entrySet()) {
            for (Map.Entry<String, Integer> predicted : gold.getValue().entrySet()) {
                int value = predicted.getValue();

                // add reverted values
                result.increaseValue(predicted.getKey(), gold.getKey(), value);
            }
        }

        return result;
    }
881114
public int getValueIndex() {

        int result = 0;
        Node previousSibling = getElement().getPreviousSibling();
        while (previousSibling != null) {
            result++;
            previousSibling = previousSibling.getPreviousSibling();
        }
        return result;
    }