use of org.matheclipse.core.interfaces.IASTMutable in project symja_android_library by axkr.
the class ASTAssociation method keySort.
@Override
public IAssociation keySort(Comparator<IExpr> comparator) {
IASTMutable list = keys();
if (comparator == null) {
EvalAttributes.sort(list);
} else {
EvalAttributes.sort(list, comparator);
}
ASTAssociation assoc = new ASTAssociation();
for (int i = 1; i < list.size(); i++) {
IExpr key = list.get(i);
int value = getInt(key);
assoc.appendRule(getRule(value));
}
return assoc;
}
use of org.matheclipse.core.interfaces.IASTMutable in project symja_android_library by axkr.
the class ASTRealMatrix method setAtCopy.
@Override
public IASTMutable setAtCopy(int i, IExpr expr) {
if (expr instanceof ASTRealVector) {
IASTMutable ast = copy();
ast.set(i, expr);
return ast;
}
IASTAppendable ast = copyAppendable();
ast.set(i, expr);
return ast;
}
use of org.matheclipse.core.interfaces.IASTMutable in project symja_android_library by axkr.
the class B2 method setAtCopy.
@Override
public IASTMutable setAtCopy(int i, IExpr expr) {
if (i == 0) {
return new AST2(expr, arg1(), arg2());
}
IASTMutable ast = copy();
ast.set(i, expr);
return ast;
}
use of org.matheclipse.core.interfaces.IASTMutable in project symja_android_library by axkr.
the class B1 method setAtCopy.
@Override
public IASTMutable setAtCopy(int i, IExpr expr) {
if (i == 0) {
return new AST1(expr, arg1());
}
IASTMutable ast = copy();
ast.set(i, expr);
return ast;
}
use of org.matheclipse.core.interfaces.IASTMutable in project symja_android_library by axkr.
the class ASTRRBTree method setAtCopy.
@Override
public IASTMutable setAtCopy(int i, IExpr expr) {
IASTMutable ast = copy();
ast.set(i, expr);
return ast;
}
Aggregations