/* (non-Javadoc)
@see org.joml.Matrix4dc#getTransposed(int, java.nio.DoubleBuffer)
325438
public DoubleBuffer getTransposed(int index, DoubleBuffer dest) {
        MemUtil.INSTANCE.putTransposed(this, index, dest);
        return dest;
    }
775925
public static Matrix4d superposeAndTransform(Point3d[] fixed,
			Point3d[] moved) {
		superposer.setCentered(false);
		return superposer.superposeAndTransform(fixed, moved);
	}
1068159
@Nonnull
  @ReturnsMutableCopy
  public Matrix getR ()
  {
    final Matrix aNewMatrix = new Matrix (m_nCols, m_nCols);
    final double [] [] aNewArray = aNewMatrix.internalGetArray ();
    for (int nRow = 0; nRow < m_nCols; nRow++)
    {
      final double [] aDstRow = aNewArray[nRow];
      for (int j = 0; j < m_nCols; j++)
      {
        if (nRow < j)
          aDstRow[j] = m_aQR[nRow][j];
        else
          if (nRow == j)
            aDstRow[j] = m_aRdiag[nRow];
          else
            aDstRow[j] = 0.0;
      }
    }
    return aNewMatrix;
  }
1205851
@Override
	protected DoubleMatrix1D getFi(DoubleMatrix1D X){
		double[] ret = new double[getMieq()];
		for(int i=0; i<getDim(); i++){
			ret[i] = -X.getQuick(i) + getLb().getQuick(i);
			ret[getDim() + i] = X.getQuick(i) - getUb().getQuick(i) ;
		}
		return F1.make(ret);
	}
1352933
public DataBuffer getIncludedValues() {
        List<Double> val = new ArrayList<>();

        for (int i = 0; i < values.length(); i++) {
            boolean isIn = true;
            int idxNotFixed = 0;
            int[] idx = getUnderlyingIndicesOf(i).asInt();
            for (int dim = 0; dim < idx.length; dim++) {
                if (flags()[dim] == 1) {
                    if (sparseOffsets()[dim] != idx[dim]) {
                        isIn = false;
                        break;
                    }
                } else {
                    int lowerBound = sparseOffsets()[dim];
                    long upperBound = sparseOffsets()[dim] + shape()[idxNotFixed];
                    if (!(idx[dim] >= lowerBound && idx[dim] < upperBound)) {
                        isIn = false;
                        break;
                    }
                    idxNotFixed++;
                }
            }
            if (isIn) {
                val.add(values.getDouble(i));
            }
        }
        return Nd4j.createBuffer(Doubles.toArray(val));
    }
905244
public ByteBuffer getAsMatrix3f(ByteBuffer dest) {
        MemUtil.INSTANCE.putMatrix3f(this, dest.position(), dest);
        return dest;
    }
254294
public ByteBuffer getFloats(int index, ByteBuffer buffer) {
        MemUtil.INSTANCE.putf(this, index, buffer);
        return buffer;
    }
337160
public synchronized ByteBuffer getBuffer()
    {
        ByteBuffer buf=null;
        int s=LazyList.size(_recycle);
        if (s>0)
        {
            s--;
             buf=(ByteBuffer)LazyList.get(_recycle, s);
             _recycle=LazyList.remove(_recycle,s);
             buf.clear();
        }
        else
        {
            buf=ByteBuffer.allocateDirect(_bufferSize);
        }
         return buf;     
    }
315898
private void convertBufferIfNeeded() {

        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.entry(tc, "convertBufferIfNeeded status: " + status);
        }

        if (isFCEnabled()) {

            // TRANSFER_TO status is currently on, so turn if OFF
            status = status & (~WsByteBuffer.STATUS_TRANSFER_TO);
            // and turn on BUFFER status
            status = status | WsByteBuffer.STATUS_BUFFER;

            try {
                // save so we can restore the current position
                int bufPosition = (int) fc.position();

                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "creating a MappedByteBuffer from the FileChannel. position: " + 0 + "  size: " + fc.size());
                }

                // map entire FileChannel buffer to ByteBuffer
                try {
                    oByteBuffer = fc.map(MapMode.PRIVATE, 0, fc.size());
                } catch (NonWritableChannelException e) {
                    if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                        Tr.debug(tc, "FileChannel is readonly");
                    }
                    oByteBuffer = fc.map(MapMode.READ_ONLY, 0, fc.size());
                    setReadOnly(true);
                }

                // The mapped byte buffer returned by this method will have a
                // position of zero and a limit and capacity of size;
                // its mark will be undefined.
                // The buffer and the mapping that it represents will
                // remain valid until the buffer itself is garbage-collected.

                // restore the position and limit
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "set MappedByteBuffer position to: " + bufPosition + " limit to: " + fcLimit);
                }
                position(bufPosition);
                limit(fcLimit);
            } catch (IOException e) {
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "got IOException: " + e);
                }
                FFDCFilter.processException(e, CLASS_NAME + ".convertBufferIfNeeded", "112", this);
                throw new RuntimeException(e);
            }
        }
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled()) {
            Tr.exit(tc, "convertBufferIfNeeded status: " + status);
        }
    }
186881
function getTransfers(queue) {
    var transfers = [];
    var fnArray = queue.fnArray, argsArray = queue.argsArray;
    for (var i = 0, ii = queue.length; i < ii; i++) {
      switch (fnArray[i]) {
        case OPS.paintInlineImageXObject:
        case OPS.paintInlineImageXObjectGroup:
        case OPS.paintImageMaskXObject:
          var arg = argsArray[i][0]; // first param in imgData
          if (!arg.cached) {
            transfers.push(arg.data.buffer);
          }
          break;
      }
    }
    return transfers;
  }
1010362
public ByteBuffer getBuffer() {
        assert(isDirect == false);
        assert(buffer.b().hasArray());
        assert(!buffer.b().isDirect());
        buffer.b().flip();
        return buffer.b().asReadOnlyBuffer();
    }
228932
@Override
    public INDArray convertDataEx(DataTypeEx typeSrc, INDArray source, DataTypeEx typeDst) {
        if (source.isView())
            throw new UnsupportedOperationException("Impossible to compress View. Consider using dup() before. ");

        DataBuffer buffer = convertDataEx(typeSrc, source.data(), typeDst);
        source.setData(buffer);

        if (buffer instanceof CompressedDataBuffer)
            source.markAsCompressed(true);
        else
            source.markAsCompressed(false);

        return source;
    }
480005
public FloatBuffer get4x3(int index, FloatBuffer buffer) {
        MemUtil.INSTANCE.put4x3(this, index, buffer);
        return buffer;
    }
200849
public static DoubleBuffer createDoubleBuffer(int elements)
    {
        ByteBuffer byteBuffer = ByteBuffer.allocateDirect(elements * 8);
        byteBuffer.order(ByteOrder.nativeOrder());
        return byteBuffer.asDoubleBuffer();
    }
918466
public static double[] convertToDoubleArray(Matrix4d transformationMatrix) {
		// Initialise the output array
		double[] outArray = new double[16];
		// Iterate over the matrix
		for(int i=0; i<4; i++){
			for(int j=0; j<4; j++){
				// Now set this element
				outArray[i*4+j] = transformationMatrix.getElement(i,j);
			}
		}
		return outArray;
	}
842476
private RectF getDisplayRect(Matrix matrix) {
        ImageView imageView = getImageView();

        if (null != imageView) {
            Drawable d = imageView.getDrawable();
            if (null != d) {
                mDisplayRect.set(0, 0, d.getIntrinsicWidth(), d.getIntrinsicHeight());
                matrix.mapRect(mDisplayRect);
                return mDisplayRect;
            }
        }
        return null;
    }
1291963
public <V> V convertFrom(final ByteBuffer... buffers) {
        if (buffers == null || buffers.length == 0) return null;
        return (V) new AnyDecoder(factory).convertFrom(new JsonByteBufferReader((ConvertMask) null, buffers));
    }