/* (non-Javadoc)
@see org.joml.Matrix3dc#invert(org.joml.Matrix3d)
499861
public Matrix3d invert(Matrix3d dest) {
        double s = 1.0 / determinant();
        double nm00 = (m11 * m22 - m21 * m12) * s;
        double nm01 = (m21 * m02 - m01 * m22) * s;
        double nm02 = (m01 * m12 - m11 * m02) * s;
        double nm10 = (m20 * m12 - m10 * m22) * s;
        double nm11 = (m00 * m22 - m20 * m02) * s;
        double nm12 = (m10 * m02 - m00 * m12) * s;
        double nm20 = (m10 * m21 - m20 * m11) * s;
        double nm21 = (m20 * m01 - m00 * m21) * s;
        double nm22 = (m00 * m11 - m10 * m01) * s;
        dest.m00 = nm00;
        dest.m01 = nm01;
        dest.m02 = nm02;
        dest.m10 = nm10;
        dest.m11 = nm11;
        dest.m12 = nm12;
        dest.m20 = nm20;
        dest.m21 = nm21;
        dest.m22 = nm22;
        return dest;
    }
987012
public Matrix4x3d set(Vector3dc col0,
                          Vector3dc col1, 
                          Vector3dc col2,
                          Vector3dc col3) {
        this.m00 = col0.x();
        this.m01 = col0.y();
        this.m02 = col0.z();
        this.m10 = col1.x();
        this.m11 = col1.y();
        this.m12 = col1.z();
        this.m20 = col2.x();
        this.m21 = col2.y();
        this.m22 = col2.z();
        this.m30 = col3.x();
        this.m31 = col3.y();
        this.m32 = col3.z();
        this.properties = 0;
        return this;
    }
379649
public Vector3f transformPosition(float x, float y, float z, Vector3f dest) {
        dest.x = x;
        dest.y = y;
        dest.z = z;
        return dest.mulPosition(this);
    }
154640
private static LineString reverse3D(LineString lineString, String order) {
        CoordinateSequence seq = lineString.getCoordinateSequence();
        double startZ = seq.getCoordinate(0).z;
        double endZ = seq.getCoordinate(seq.size() - 1).z;
        if (order.equalsIgnoreCase("desc")) {
            if (!Double.isNaN(startZ) && !Double.isNaN(endZ) && startZ < endZ) {
                CoordinateSequences.reverse(seq);
                return FACTORY.createLineString(seq);
            }
        } else if (order.equalsIgnoreCase("asc")) {
            if (!Double.isNaN(startZ) && !Double.isNaN(endZ) && startZ > endZ) {
                CoordinateSequences.reverse(seq);
                return FACTORY.createLineString(seq);
            }
        }
        else {
            throw new IllegalArgumentException("Supported order values are asc or desc.");
        }
        return lineString;
    }
218602
public void inverse (double data[]) {
    backtransform(data);
  /* normalize inverse fft with 2/n */
    double norm = normalization();
    for (int i = 0; i < n; i++)
      data[i]   *= norm;
  }
74763
private static Map<TypeVariable<?>, Type> invert(Map<TypeVariable<?>, Type> m) {
        final TypeVariableMap result = new TypeVariableMap();
        for (Map.Entry<TypeVariable<?>, Type> e : m.entrySet()) {
            if (e.getValue() instanceof TypeVariable<?>) {
                result.put((TypeVariable<?>) e.getValue(), e.getKey());
            }
        }
        return result;
    }
776115
@Override
    public INDArray rot(INDArray reverse) {
        INDArray ret = Nd4j.create(reverse.shape());
        if (reverse.isVector())
            return reverse(reverse);
        else {
            for (int i = 0; i < reverse.slices(); i++) {
                ret.putSlice(i, reverse(reverse.slice(i)));
            }
        }
        return ret.reshape(reverse.shape());
    }
134316
public static <X, Y> Map<Y, X> invert(Map<X, Y> map) {
    Map<Y, X> invertedMap = new HashMap<Y, X>();
    for (Map.Entry<X, Y> entry : map.entrySet()) {
      X key = entry.getKey();
      Y value = entry.getValue();
      invertedMap.put(value, key);
    }
    return invertedMap;
  }
712505
@Override
    public boolean invert() {
        double determinant = determinant();
        if (determinant == 0) {
            return false;
        }

        // first row
        double t00 =  determinant3x3(m11, m12, m13, m21, m22, m23, m31, m32, m33);
        double t01 = -determinant3x3(m10, m12, m13, m20, m22, m23, m30, m32, m33);
        double t02 =  determinant3x3(m10, m11, m13, m20, m21, m23, m30, m31, m33);
        double t03 = -determinant3x3(m10, m11, m12, m20, m21, m22, m30, m31, m32);

        // second row
        double t10 = -determinant3x3(m01, m02, m03, m21, m22, m23, m31, m32, m33);
        double t11 =  determinant3x3(m00, m02, m03, m20, m22, m23, m30, m32, m33);
        double t12 = -determinant3x3(m00, m01, m03, m20, m21, m23, m30, m31, m33);
        double t13 =  determinant3x3(m00, m01, m02, m20, m21, m22, m30, m31, m32);

        // third row
        double t20 =  determinant3x3(m01, m02, m03, m11, m12, m13, m31, m32, m33);
        double t21 = -determinant3x3(m00, m02, m03, m10, m12, m13, m30, m32, m33);
        double t22 =  determinant3x3(m00, m01, m03, m10, m11, m13, m30, m31, m33);
        double t23 = -determinant3x3(m00, m01, m02, m10, m11, m12, m30, m31, m32);

        // fourth row
        double t30 = -determinant3x3(m01, m02, m03, m11, m12, m13, m21, m22, m23);
        double t31 =  determinant3x3(m00, m02, m03, m10, m12, m13, m20, m22, m23);
        double t32 = -determinant3x3(m00, m01, m03, m10, m11, m13, m20, m21, m23);
        double t33 =  determinant3x3(m00, m01, m02, m10, m11, m12, m20, m21, m22);

        // transpose and divide by the determinant
        m00 = t00 / determinant;
        m01 = t10 / determinant;
        m02 = t20 / determinant;
        m03 = t30 / determinant;

        m10 = t01 / determinant;
        m11 = t11 / determinant;
        m12 = t21 / determinant;
        m13 = t31 / determinant;

        m20 = t02 / determinant;
        m21 = t12 / determinant;
        m22 = t22 / determinant;
        m23 = t32 / determinant;

        m30 = t03 / determinant;
        m31 = t13 / determinant;
        m32 = t23 / determinant;
        m33 = t33 / determinant;

        return true;
    }
28197
public Matrix4d set3x3(Matrix3dc mat) {
        m00 = mat.m00();
        m01 = mat.m01();
        m02 = mat.m02();
        m10 = mat.m10();
        m11 = mat.m11();
        m12 = mat.m12();
        m20 = mat.m20();
        m21 = mat.m21();
        m22 = mat.m22();
        properties &= ~(PROPERTY_PERSPECTIVE | PROPERTY_IDENTITY | PROPERTY_TRANSLATION | PROPERTY_ORTHONORMAL);
        return this;
    }
831255
@Override
	public void translate(float x, float y, float z)
	{
		transformMatrix.translate(new Vector3f(x, y, z));
	}
1176351
def invert(self, src=None):
        
        if src is None:
            dst = TOOLS._invert_matrix(self)
        else:
            dst = TOOLS._invert_matrix(src)
        if dst[0] == 1:
            return 1
        self.a, self.b, self.c, self.d, self.e, self.f = dst[1]
        return 0
166805
public final void inverse() {
		double norm;  

		norm = 1f/(this.w*this.w + this.x*this.x + this.y*this.y + this.z*this.z);
		this.w *=  norm;
		this.x *= -norm;
		this.y *= -norm;
		this.z *= -norm;
	}
1314055
def invert_affine_mat44(mat):
    

    inverted = Matrix44()

    # Transpose the 3x3 rotation component
    for i in range(3):
        for j in range(3):
            inverted.data[i][j] = mat.data[j][i]

    # Set translation: inverted_trans_vec3 = -inv(rot_mat33) * trans_vec3
    for row in range(3):
        inverted.data[3][row] = (
            -inverted.data[0][row] * mat.data[3][0] +
            -inverted.data[1][row] * mat.data[3][1] +
            -inverted.data[2][row] * mat.data[3][2])

    return inverted
1342904
@Override
	public ParallelTransformation reversed(boolean reversed)
	{
		if (!reversed)
			return this;

		for (Transformation<?, ?> transformation : listTransformations)
			transformation.reversed(true);

		return this;
	}
61704
@Override
  public IVersionRange invert() {
    if (ranges.size() == 2) {
      IVersionRange irange1 = ranges.first().invert();
      IVersionRange irange2 = ranges.last().invert();
      return new AndRange(irange1, irange2);
    }

    throw new UnsupportedOperationException();
  }
111486
function (projectionMatrix) {
        Matrix4.copy(this.projectionMatrix, projectionMatrix);
        Matrix4.invert(this.invProjectionMatrix, projectionMatrix);
        this.decomposeProjectionMatrix();
    }