Skip to content

Commit

Permalink
MapPositions: Refactor method name
Browse files Browse the repository at this point in the history
  • Loading branch information
axkr committed Dec 22, 2024
1 parent 2705aa4 commit 89ff7fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ public IExpr evaluate(IAST ast, EvalEngine engine) {
}
if (arg3.isListOfLists()) {
IAST listOfLists = ((IAST) arg3);
return MapPositions.mapListOfPoints(x -> F.unaryAST1(arg1, x), (IAST) arg2,
return MapPositions.mapListOfPositions(x -> F.unaryAST1(arg1, x), (IAST) arg2,
listOfLists);
} else if (arg3.isList()) {
IExpr temp = MapPositions.mapPositions(x -> F.unaryAST1(arg1, x), ((IAST) arg2), (IAST) arg3);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ private void reset(IAST positions) {
*
* @param f function to apply
* @param ast
* @param listOfPoints
* @param listOfPositions
*/
public static IExpr mapListOfPoints(Function<IExpr, IExpr> f, IAST ast, IAST listOfPoints) {
public static IExpr mapListOfPositions(Function<IExpr, IExpr> f, IAST ast, IAST listOfPositions) {
MapPositions mapPositions = new MapPositions(f);
for (int i = 1; i < listOfPoints.size(); i++) {
mapPositions.reset(listOfPoints.getAST(i));
for (int i = 1; i < listOfPositions.size(); i++) {
mapPositions.reset(listOfPositions.getAST(i));
IExpr temp = mapPositions.mapAtRecursive(ast);
if (temp.isPresent()) {
if (temp.isASTOrAssociation()) {
Expand Down

0 comments on commit 89ff7fa

Please sign in to comment.