@Test public void testFactorial() { double[][] tbase = new double[2][2]; tbase[0][0] = 1; tbase[0][1] = 3; tbase[1][0] = 2; tbase[1][1] = 4; try { assertTrue("simple_transpose error: wrong result", Arrays.deepEquals(tbase, getBase((SetlMatrix) simple.factorial(state)).getArray())); } catch (SetlException ex) { System.err.println(ex.getMessage()); fail("simple_transpose error: exception"); } tbase = new double[3][2]; tbase[0][0] = 1; tbase[0][1] = 4; tbase[1][0] = 2; tbase[1][1] = 5; tbase[2][0] = 3; tbase[2][1] = 6; try { assertTrue("sns_transpose error: wrong result", Arrays.deepEquals(tbase, getBase((SetlMatrix) sns.factorial(state)).getArray())); } catch (SetlException ex) { System.err.println(ex.getMessage()); fail("sns_transpose error: exception"); } }
@Override public Value factorial(final State state) throws SetlException { return this.transpose(); }
SetlMatrix extends IndexedCollectionValue { @Override public Value factorial(final State state) throws SetlException { return this.transpose(); } }
SetlMatrix extends IndexedCollectionValue { @Override public Value factorial(final State state) throws SetlException { return this.transpose(); } SetlMatrix(Jama.Matrix v);  SetlMatrix(final State state, final List<SetlVector> vectors);  SetlMatrix(final State state, final CollectionValue init);  SetlMatrix(final State state, final SetlVector vector); }
SetlMatrix extends IndexedCollectionValue { @Override public Value factorial(final State state) throws SetlException { return this.transpose(); } SetlMatrix(Jama.Matrix v);  SetlMatrix(final State state, final List<SetlVector> vectors);  SetlMatrix(final State state, final CollectionValue init);  SetlMatrix(final State state, final SetlVector vector); @Override Value clone(); @Override Iterator<Value> iterator(); @Override Iterator<Value> descendingIterator(); @Override SetlBoolean isMatrix(); SetlVector toVector(); @Override Value difference(final State state, final Value subtrahend); @Override Value differenceAssign(final State state, final Value subtrahend); @Override Value factorial(final State state); @Override Value power(final State state, final Value exponent); @Override Value product(final State state, final Value multiplier); @Override Value productAssign(final State state, final Value multiplier); @Override Value sum(final State state, final Value summand); @Override Value sumAssign(final State state, final Value summand); @Override void addMember(State state, Value element); @Override SetlBoolean containsMember(State state, Value element); @Override Value firstMember(); @Override Value getMember(int index); @Override Value getMember(State state, Value index); @Override Value getMembers(final State state, final int expectedNumberOfMembers, final int lowFromStart, final int highFromStart); @Override Value lastMember(); @Override Value maximumMember(State state); @Override Value minimumMember(State state); @Override Value removeFirstMember(); @Override Value removeLastMember(); @Override void removeMember(State state, Value element); @Override void setMember(final State state, final Value index, final Value value); @Override void setMember(final State state, int index, final Value value); @Override int size(); SetlDouble condition(); SetlDouble determinant(); SetlList eigenVectors(State state); SetlMatrix hadamardProduct(State state, Value other); SetlList eigenValues(State state); SetlMatrix pseudoInverse(); SetlList singularValueDecomposition(State state); Value solve(SetlMatrix other); @Override void appendString(final State state, final StringBuilder sb, final int tabs); @Override void canonical(final State state, final StringBuilder sb); @Override MatchResult matchesTerm(State state, Value other); @Override int compareTo(CodeFragment other); @Override long compareToOrdering(); @Override boolean equalTo(Object other); @Override int hashCode(); }
SetlMatrix extends IndexedCollectionValue { @Override public Value factorial(final State state) throws SetlException { return this.transpose(); } SetlMatrix(Jama.Matrix v);  SetlMatrix(final State state, final List<SetlVector> vectors);  SetlMatrix(final State state, final CollectionValue init);  SetlMatrix(final State state, final SetlVector vector); @Override Value clone(); @Override Iterator<Value> iterator(); @Override Iterator<Value> descendingIterator(); @Override SetlBoolean isMatrix(); SetlVector toVector(); @Override Value difference(final State state, final Value subtrahend); @Override Value differenceAssign(final State state, final Value subtrahend); @Override Value factorial(final State state); @Override Value power(final State state, final Value exponent); @Override Value product(final State state, final Value multiplier); @Override Value productAssign(final State state, final Value multiplier); @Override Value sum(final State state, final Value summand); @Override Value sumAssign(final State state, final Value summand); @Override void addMember(State state, Value element); @Override SetlBoolean containsMember(State state, Value element); @Override Value firstMember(); @Override Value getMember(int index); @Override Value getMember(State state, Value index); @Override Value getMembers(final State state, final int expectedNumberOfMembers, final int lowFromStart, final int highFromStart); @Override Value lastMember(); @Override Value maximumMember(State state); @Override Value minimumMember(State state); @Override Value removeFirstMember(); @Override Value removeLastMember(); @Override void removeMember(State state, Value element); @Override void setMember(final State state, final Value index, final Value value); @Override void setMember(final State state, int index, final Value value); @Override int size(); SetlDouble condition(); SetlDouble determinant(); SetlList eigenVectors(State state); SetlMatrix hadamardProduct(State state, Value other); SetlList eigenValues(State state); SetlMatrix pseudoInverse(); SetlList singularValueDecomposition(State state); Value solve(SetlMatrix other); @Override void appendString(final State state, final StringBuilder sb, final int tabs); @Override void canonical(final State state, final StringBuilder sb); @Override MatchResult matchesTerm(State state, Value other); @Override int compareTo(CodeFragment other); @Override long compareToOrdering(); @Override boolean equalTo(Object other); @Override int hashCode();  }