summaryrefslogtreecommitdiff
path: root/Build/source/utils/asymptote/runarray.cc
diff options
context:
space:
mode:
Diffstat (limited to 'Build/source/utils/asymptote/runarray.cc')
-rw-r--r--Build/source/utils/asymptote/runarray.cc653
1 files changed, 310 insertions, 343 deletions
diff --git a/Build/source/utils/asymptote/runarray.cc b/Build/source/utils/asymptote/runarray.cc
index 0d8e5040c6f..5841f70fa68 100644
--- a/Build/source/utils/asymptote/runarray.cc
+++ b/Build/source/utils/asymptote/runarray.cc
@@ -180,27 +180,6 @@ array *copyArray2(array *a)
return c;
}
-array *copyArray3(array *a)
-{
- size_t size=checkArray(a);
- array *c=new array(size);
- for(size_t i=0; i < size; i++) {
- array *ai=read<array*>(a,i);
- size_t aisize=checkArray(ai);
- array *ci=new array(aisize);
- (*c)[i]=ci;
- for(size_t j=0; j < aisize; j++) {
- array *aij=read<array*>(ai,j);
- size_t aijsize=checkArray(aij);
- array *cij=new array(aijsize);
- (*ci)[j]=cij;
- for(size_t k=0; k < aijsize; k++)
- (*cij)[k]=(*aij)[k];
- }
- }
- return c;
-}
-
double *copyTripleArray2Components(array *a, bool square, size_t dim2,
GCPlacement placement)
{
@@ -491,10 +470,10 @@ void integeroverflow(size_t i)
#endif
namespace run {
// Create an empty array.
-#line 446 "runarray.in"
+#line 425 "runarray.in"
void emptyArray(stack *Stack)
{
-#line 447 "runarray.in"
+#line 426 "runarray.in"
{Stack->push<array*>(new array(0)); return;}
}
@@ -503,11 +482,11 @@ void emptyArray(stack *Stack)
// is popped off the stack, followed by each dimension in reverse order.
// The array itself is technically a one dimensional array of one
// dimension arrays and so on.
-#line 456 "runarray.in"
+#line 435 "runarray.in"
void newDeepArray(stack *Stack)
{
Int depth=vm::pop<Int>(Stack);
-#line 457 "runarray.in"
+#line 436 "runarray.in"
assert(depth > 0);
Int *dims = new Int[depth];
@@ -526,11 +505,11 @@ void newDeepArray(stack *Stack)
// Creates an array with elements already specified. First, the number
// of elements is popped off the stack, followed by each element in
// reverse order.
-#line 476 "runarray.in"
+#line 455 "runarray.in"
void newInitializedArray(stack *Stack)
{
Int n=vm::pop<Int>(Stack);
-#line 477 "runarray.in"
+#line 456 "runarray.in"
assert(n >= 0);
array *a = new array(n);
@@ -543,12 +522,12 @@ void newInitializedArray(stack *Stack)
// Similar to newInitializedArray, but after the n elements, append another
// array to it.
-#line 490 "runarray.in"
+#line 469 "runarray.in"
void newAppendedArray(stack *Stack)
{
Int n=vm::pop<Int>(Stack);
array* tail=vm::pop<array*>(Stack);
-#line 491 "runarray.in"
+#line 470 "runarray.in"
assert(n >= 0);
array *a = new array(n);
@@ -565,27 +544,43 @@ void newAppendedArray(stack *Stack)
// typeDepth is the true depth of the array determined at compile-time when the
// operations for the array type are added. This typeDepth argument is
// automatically pushed on the stack and is not visible to the user.
-#line 508 "runarray.in"
-void copyArray(stack *Stack)
+#line 487 "runarray.in"
+void copyArrayValue(stack *Stack)
{
Int typeDepth=vm::pop<Int>(Stack);
Int depth=vm::pop<Int>(Stack,Int_MAX);
item value=vm::pop(Stack);
Int n=vm::pop<Int>(Stack);
-#line 509 "runarray.in"
+#line 488 "runarray.in"
if(n < 0) error("cannot create a negative length array");
if(depth < 0) error("cannot copy to a negative depth");
if(depth > typeDepth) depth=typeDepth;
{Stack->push<array*>(new array((size_t) n, value, depth)); return;}
}
+// Deep copy of array.
+// typeDepth is the true depth of the array determined at compile-time when the
+// operations for the array type are added. This typeDepth argument is
+// automatically pushed on the stack and is not visible to the user.
+#line 499 "runarray.in"
+void copyArray(stack *Stack)
+{
+ Int typeDepth=vm::pop<Int>(Stack);
+ Int depth=vm::pop<Int>(Stack,Int_MAX);
+ array * a=vm::pop<array *>(Stack);
+#line 500 "runarray.in"
+ if(depth < 0) error("cannot copy to a negative depth");
+ if(depth > typeDepth) depth=typeDepth;
+ {Stack->push<array*>(a->copyToDepth(depth)); return;}
+}
+
// Read an element from an array. Checks for initialization & bounds.
-#line 517 "runarray.in"
+#line 507 "runarray.in"
void arrayRead(stack *Stack)
{
Int n=vm::pop<Int>(Stack);
array * a=vm::pop<array *>(Stack);
-#line 518 "runarray.in"
+#line 508 "runarray.in"
item& i=arrayRead(a,n);
if (i.empty()) {
ostringstream buf;
@@ -596,37 +591,37 @@ void arrayRead(stack *Stack)
}
// Slice a substring from an array.
-#line 529 "runarray.in"
+#line 519 "runarray.in"
void arraySliceRead(stack *Stack)
{
Int right=vm::pop<Int>(Stack);
Int left=vm::pop<Int>(Stack);
array * a=vm::pop<array *>(Stack);
-#line 530 "runarray.in"
+#line 520 "runarray.in"
checkArray(a);
{Stack->push(a->slice(left, right)); return;}
}
// Slice a substring from an array. This implements the cases a[i:] and a[:]
// where the endpoint is not given, and assumed to be the length of the array.
-#line 537 "runarray.in"
+#line 527 "runarray.in"
void arraySliceReadToEnd(stack *Stack)
{
Int left=vm::pop<Int>(Stack);
array * a=vm::pop<array *>(Stack);
-#line 538 "runarray.in"
+#line 528 "runarray.in"
size_t len=checkArray(a);
{Stack->push(a->slice(left, (Int)len)); return;}
}
// Read an element from an array of arrays. Check bounds and initialize
// as necessary.
-#line 545 "runarray.in"
+#line 535 "runarray.in"
void arrayArrayRead(stack *Stack)
{
Int n=vm::pop<Int>(Stack);
array * a=vm::pop<array *>(Stack);
-#line 546 "runarray.in"
+#line 536 "runarray.in"
item& i=arrayRead(a,n);
if (i.empty()) i=new array(0);
{Stack->push(i); return;}
@@ -634,13 +629,13 @@ void arrayArrayRead(stack *Stack)
// Write an element to an array. Increase size if necessary.
// TODO: Add arrayWriteAndPop
-#line 554 "runarray.in"
+#line 544 "runarray.in"
void arrayWrite(stack *Stack)
{
item value=vm::pop(Stack);
Int n=vm::pop<Int>(Stack);
array * a=vm::pop<array *>(Stack);
-#line 555 "runarray.in"
+#line 545 "runarray.in"
size_t len=checkArray(a);
bool cyclic=a->cyclic();
if(cyclic && len > 0) n=imod(n,len);
@@ -654,27 +649,27 @@ void arrayWrite(stack *Stack)
{Stack->push(value); return;}
}
-#line 569 "runarray.in"
+#line 559 "runarray.in"
void arraySliceWrite(stack *Stack)
{
array * src=vm::pop<array *>(Stack);
Int right=vm::pop<Int>(Stack);
Int left=vm::pop<Int>(Stack);
array * dest=vm::pop<array *>(Stack);
-#line 570 "runarray.in"
+#line 560 "runarray.in"
checkArray(src);
checkArray(dest);
dest->setSlice(left, right, src);
{Stack->push<array*>(src); return;}
}
-#line 577 "runarray.in"
+#line 567 "runarray.in"
void arraySliceWriteToEnd(stack *Stack)
{
array * src=vm::pop<array *>(Stack);
Int left=vm::pop<Int>(Stack);
array * dest=vm::pop<array *>(Stack);
-#line 578 "runarray.in"
+#line 568 "runarray.in"
checkArray(src);
size_t len=checkArray(dest);
dest->setSlice(left, (Int) len, src);
@@ -682,20 +677,20 @@ void arraySliceWriteToEnd(stack *Stack)
}
// Returns the length of an array.
-#line 586 "runarray.in"
+#line 576 "runarray.in"
void arrayLength(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 587 "runarray.in"
+#line 577 "runarray.in"
{Stack->push<Int>((Int) checkArray(a)); return;}
}
// Returns an array of integers representing the keys of the array.
-#line 592 "runarray.in"
+#line 582 "runarray.in"
void arrayKeys(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 593 "runarray.in"
+#line 583 "runarray.in"
size_t size=checkArray(a);
array *keys=new array();
@@ -709,33 +704,33 @@ void arrayKeys(stack *Stack)
}
// Return the cyclic flag for an array.
-#line 607 "runarray.in"
+#line 597 "runarray.in"
void arrayCyclicFlag(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 608 "runarray.in"
+#line 598 "runarray.in"
checkArray(a);
{Stack->push<bool>(a->cyclic()); return;}
}
-#line 613 "runarray.in"
+#line 603 "runarray.in"
void arraySetCyclicFlag(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
bool b=vm::pop<bool>(Stack);
-#line 614 "runarray.in"
+#line 604 "runarray.in"
checkArray(a);
a->cyclic(b);
{Stack->push<bool>(b); return;}
}
// Check to see if an array element is initialized.
-#line 621 "runarray.in"
+#line 611 "runarray.in"
void arrayInitializedHelper(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
Int n=vm::pop<Int>(Stack);
-#line 622 "runarray.in"
+#line 612 "runarray.in"
size_t len=checkArray(a);
bool cyclic=a->cyclic();
if(cyclic && len > 0) n=imod(n,len);
@@ -745,62 +740,62 @@ void arrayInitializedHelper(stack *Stack)
}
// Returns the initialize method for an array.
-#line 632 "runarray.in"
+#line 622 "runarray.in"
void arrayInitialized(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 633 "runarray.in"
+#line 623 "runarray.in"
{Stack->push<callable*>(new thunk(new bfunc(arrayInitializedHelper),a)); return;}
}
// The helper function for the cyclic method that sets the cyclic flag.
-#line 638 "runarray.in"
+#line 628 "runarray.in"
void arrayCyclicHelper(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
bool b=vm::pop<bool>(Stack);
-#line 639 "runarray.in"
+#line 629 "runarray.in"
checkArray(a);
a->cyclic(b);
}
// Set the cyclic flag for an array.
-#line 645 "runarray.in"
+#line 635 "runarray.in"
void arrayCyclic(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 646 "runarray.in"
+#line 636 "runarray.in"
{Stack->push<callable*>(new thunk(new bfunc(arrayCyclicHelper),a)); return;}
}
// The helper function for the push method that does the actual operation.
-#line 651 "runarray.in"
+#line 641 "runarray.in"
void arrayPushHelper(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
item x=vm::pop(Stack);
-#line 652 "runarray.in"
+#line 642 "runarray.in"
checkArray(a);
a->push(x);
{Stack->push(x); return;}
}
// Returns the push method for an array.
-#line 659 "runarray.in"
+#line 649 "runarray.in"
void arrayPush(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 660 "runarray.in"
+#line 650 "runarray.in"
{Stack->push<callable*>(new thunk(new bfunc(arrayPushHelper),a)); return;}
}
// The helper function for the append method that appends b to a.
-#line 665 "runarray.in"
+#line 655 "runarray.in"
void arrayAppendHelper(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
array * b=vm::pop<array *>(Stack);
-#line 666 "runarray.in"
+#line 656 "runarray.in"
checkArray(a);
size_t size=checkArray(b);
for(size_t i=0; i < size; i++)
@@ -808,20 +803,20 @@ void arrayAppendHelper(stack *Stack)
}
// Returns the append method for an array.
-#line 674 "runarray.in"
+#line 664 "runarray.in"
void arrayAppend(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 675 "runarray.in"
+#line 665 "runarray.in"
{Stack->push<callable*>(new thunk(new bfunc(arrayAppendHelper),a)); return;}
}
// The helper function for the pop method.
-#line 680 "runarray.in"
+#line 670 "runarray.in"
void arrayPopHelper(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 681 "runarray.in"
+#line 671 "runarray.in"
size_t asize=checkArray(a);
if(asize == 0)
error("cannot pop element from empty array");
@@ -829,22 +824,22 @@ void arrayPopHelper(stack *Stack)
}
// Returns the pop method for an array.
-#line 689 "runarray.in"
+#line 679 "runarray.in"
void arrayPop(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 690 "runarray.in"
+#line 680 "runarray.in"
{Stack->push<callable*>(new thunk(new bfunc(arrayPopHelper),a)); return;}
}
// The helper function for the insert method.
-#line 695 "runarray.in"
+#line 685 "runarray.in"
void arrayInsertHelper(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
array * x=vm::pop<array *>(Stack);
Int i=vm::pop<Int>(Stack);
-#line 696 "runarray.in"
+#line 686 "runarray.in"
size_t asize=checkArray(a);
checkArray(x);
if(a->cyclic() && asize > 0) i=imod(i,asize);
@@ -854,39 +849,39 @@ void arrayInsertHelper(stack *Stack)
}
// Returns the insert method for an array.
-#line 706 "runarray.in"
+#line 696 "runarray.in"
void arrayInsert(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 707 "runarray.in"
+#line 697 "runarray.in"
{Stack->push<callable*>(new thunk(new bfunc(arrayInsertHelper),a)); return;}
}
// Returns the delete method for an array.
-#line 712 "runarray.in"
+#line 702 "runarray.in"
void arrayDelete(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 713 "runarray.in"
+#line 703 "runarray.in"
{Stack->push<callable*>(new thunk(new bfunc(arrayDeleteHelper),a)); return;}
}
-#line 717 "runarray.in"
+#line 707 "runarray.in"
void arrayAlias(stack *Stack)
{
array * b=vm::pop<array *>(Stack);
array * a=vm::pop<array *>(Stack);
-#line 718 "runarray.in"
+#line 708 "runarray.in"
{Stack->push<bool>(a==b); return;}
}
// Return array formed by indexing array a with elements of integer array b
-#line 723 "runarray.in"
+#line 713 "runarray.in"
void arrayIntArray(stack *Stack)
{
array * b=vm::pop<array *>(Stack);
array * a=vm::pop<array *>(Stack);
-#line 724 "runarray.in"
+#line 714 "runarray.in"
size_t asize=checkArray(a);
size_t bsize=checkArray(b);
array *r=new array(bsize);
@@ -904,13 +899,13 @@ void arrayIntArray(stack *Stack)
// returns the complement of the integer array a in {0,2,...,n-1},
// so that b[complement(a,b.length)] yields the complement of b[a].
-#line 742 "runarray.in"
+#line 732 "runarray.in"
// Intarray* complement(Intarray *a, Int n);
-void gen_runarray31(stack *Stack)
+void gen_runarray32(stack *Stack)
{
Int n=vm::pop<Int>(Stack);
Intarray * a=vm::pop<Intarray *>(Stack);
-#line 743 "runarray.in"
+#line 733 "runarray.in"
size_t asize=checkArray(a);
array *r=new array(0);
bool *keep=new bool[n];
@@ -927,12 +922,12 @@ void gen_runarray31(stack *Stack)
}
// Generate the sequence {f(i) : i=0,1,...n-1} given a function f and integer n
-#line 760 "runarray.in"
+#line 750 "runarray.in"
void arraySequence(stack *Stack)
{
Int n=vm::pop<Int>(Stack);
callable * f=vm::pop<callable *>(Stack);
-#line 761 "runarray.in"
+#line 751 "runarray.in"
if(n < 0) n=0;
array *a=new array(n);
for(Int i=0; i < n; ++i) {
@@ -944,12 +939,12 @@ void arraySequence(stack *Stack)
}
// Return the array {0,1,...n-1}
-#line 773 "runarray.in"
+#line 763 "runarray.in"
// Intarray* sequence(Int n);
-void gen_runarray33(stack *Stack)
+void gen_runarray34(stack *Stack)
{
Int n=vm::pop<Int>(Stack);
-#line 774 "runarray.in"
+#line 764 "runarray.in"
if(n < 0) n=0;
array *a=new array(n);
for(Int i=0; i < n; ++i) {
@@ -959,12 +954,12 @@ void gen_runarray33(stack *Stack)
}
// Apply a function to each element of an array
-#line 784 "runarray.in"
+#line 774 "runarray.in"
void arrayFunction(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
callable * f=vm::pop<callable *>(Stack);
-#line 785 "runarray.in"
+#line 775 "runarray.in"
size_t size=checkArray(a);
array *b=new array(size);
for(size_t i=0; i < size; ++i) {
@@ -975,12 +970,12 @@ void arrayFunction(stack *Stack)
{Stack->push<array*>(b); return;}
}
-#line 796 "runarray.in"
+#line 786 "runarray.in"
void arraySort(stack *Stack)
{
callable * less=vm::pop<callable *>(Stack);
array * a=vm::pop<array *>(Stack);
-#line 797 "runarray.in"
+#line 787 "runarray.in"
array *c=copyArray(a);
compareFunc=less;
FuncStack=Stack;
@@ -988,13 +983,13 @@ void arraySort(stack *Stack)
{Stack->push<array*>(c); return;}
}
-#line 805 "runarray.in"
+#line 795 "runarray.in"
void arraySearch(stack *Stack)
{
callable * less=vm::pop<callable *>(Stack);
item key=vm::pop(Stack);
array * a=vm::pop<array *>(Stack);
-#line 806 "runarray.in"
+#line 796 "runarray.in"
size_t size=a->size();
compareFunc=less;
FuncStack=Stack;
@@ -1012,12 +1007,12 @@ void arraySearch(stack *Stack)
{Stack->push<Int>(0); return;}
}
-#line 824 "runarray.in"
+#line 814 "runarray.in"
// bool all(boolarray *a);
-void gen_runarray37(stack *Stack)
+void gen_runarray38(stack *Stack)
{
boolarray * a=vm::pop<boolarray *>(Stack);
-#line 825 "runarray.in"
+#line 815 "runarray.in"
size_t size=checkArray(a);
bool c=true;
for(size_t i=0; i < size; i++)
@@ -1025,12 +1020,12 @@ void gen_runarray37(stack *Stack)
{Stack->push<bool>(c); return;}
}
-#line 833 "runarray.in"
+#line 823 "runarray.in"
// boolarray* !(boolarray* a);
-void gen_runarray38(stack *Stack)
+void gen_runarray39(stack *Stack)
{
boolarray* a=vm::pop<boolarray*>(Stack);
-#line 834 "runarray.in"
+#line 824 "runarray.in"
size_t size=checkArray(a);
array *c=new array(size);
for(size_t i=0; i < size; i++)
@@ -1038,12 +1033,12 @@ void gen_runarray38(stack *Stack)
{Stack->push<boolarray*>(c); return;}
}
-#line 842 "runarray.in"
+#line 832 "runarray.in"
// Int sum(boolarray *a);
-void gen_runarray39(stack *Stack)
+void gen_runarray40(stack *Stack)
{
boolarray * a=vm::pop<boolarray *>(Stack);
-#line 843 "runarray.in"
+#line 833 "runarray.in"
size_t size=checkArray(a);
Int sum=0;
for(size_t i=0; i < size; i++)
@@ -1051,19 +1046,11 @@ void gen_runarray39(stack *Stack)
{Stack->push<Int>(sum); return;}
}
-#line 851 "runarray.in"
-void arrayCopy(stack *Stack)
-{
- array * a=vm::pop<array *>(Stack);
-#line 852 "runarray.in"
- {Stack->push<array*>(copyArray(a)); return;}
-}
-
-#line 856 "runarray.in"
+#line 841 "runarray.in"
void arrayConcat(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 857 "runarray.in"
+#line 842 "runarray.in"
// a is an array of arrays to be concatenated together.
// The signature is
// T[] concat(... T[][] a);
@@ -1090,27 +1077,11 @@ void arrayConcat(stack *Stack)
{Stack->push<array*>(result); return;}
}
-#line 884 "runarray.in"
-void array2Copy(stack *Stack)
-{
- array * a=vm::pop<array *>(Stack);
-#line 885 "runarray.in"
- {Stack->push<array*>(copyArray2(a)); return;}
-}
-
-#line 889 "runarray.in"
-void array3Copy(stack *Stack)
-{
- array * a=vm::pop<array *>(Stack);
-#line 890 "runarray.in"
- {Stack->push<array*>(copyArray3(a)); return;}
-}
-
-#line 894 "runarray.in"
+#line 869 "runarray.in"
void array2Transpose(stack *Stack)
{
array * a=vm::pop<array *>(Stack);
-#line 895 "runarray.in"
+#line 870 "runarray.in"
size_t asize=checkArray(a);
array *c=new array(0);
for(size_t i=0; i < asize; i++) {
@@ -1137,12 +1108,12 @@ void array2Transpose(stack *Stack)
// permutation (021 or 120, etc; original is 012).
// Transpose by sending respective members to the permutated locations:
// return the array obtained by putting a[i][j][k] into position perm{ijk}.
-#line 922 "runarray.in"
+#line 897 "runarray.in"
void array3Transpose(stack *Stack)
{
array * perm=vm::pop<array *>(Stack);
array * a=vm::pop<array *>(Stack);
-#line 923 "runarray.in"
+#line 898 "runarray.in"
const size_t DIM=3;
if(checkArray(perm) != DIM) {
@@ -1226,13 +1197,13 @@ void array3Transpose(stack *Stack)
// In a boolean array, find the index of the nth true value or -1 if not found
// If n is negative, search backwards.
-#line 1007 "runarray.in"
+#line 982 "runarray.in"
// Int find(boolarray *a, Int n=1);
-void gen_runarray46(stack *Stack)
+void gen_runarray44(stack *Stack)
{
Int n=vm::pop<Int>(Stack,1);
boolarray * a=vm::pop<boolarray *>(Stack);
-#line 1008 "runarray.in"
+#line 983 "runarray.in"
size_t size=checkArray(a);
Int j=-1;
if(n > 0)
@@ -1250,13 +1221,13 @@ void gen_runarray46(stack *Stack)
// construct vector obtained by replacing those elements of b for which the
// corresponding elements of a are false by the corresponding element of c.
-#line 1026 "runarray.in"
+#line 1001 "runarray.in"
void arrayConditional(stack *Stack)
{
array * c=vm::pop<array *>(Stack);
array * b=vm::pop<array *>(Stack);
array * a=vm::pop<array *>(Stack);
-#line 1027 "runarray.in"
+#line 1002 "runarray.in"
size_t size=checkArray(a);
array *r=new array(size);
if(b && c) {
@@ -1280,22 +1251,22 @@ void arrayConditional(stack *Stack)
}
// Return an n x n identity matrix.
-#line 1051 "runarray.in"
+#line 1026 "runarray.in"
// realarray2* identity(Int n);
-void gen_runarray48(stack *Stack)
+void gen_runarray46(stack *Stack)
{
Int n=vm::pop<Int>(Stack);
-#line 1052 "runarray.in"
+#line 1027 "runarray.in"
{Stack->push<realarray2*>(Identity(n)); return;}
}
// Return the inverse of an n x n matrix a using Gauss-Jordan elimination.
-#line 1057 "runarray.in"
+#line 1032 "runarray.in"
// realarray2* inverse(realarray2 *a);
-void gen_runarray49(stack *Stack)
+void gen_runarray47(stack *Stack)
{
realarray2 * a=vm::pop<realarray2 *>(Stack);
-#line 1058 "runarray.in"
+#line 1033 "runarray.in"
a=copyArray2(a);
size_t n=checkArray(a);
checkSquare(a);
@@ -1388,14 +1359,14 @@ void gen_runarray49(stack *Stack)
// Solve the linear equation ax=b by LU decomposition, returning the
// solution x, where a is an n x n matrix and b is an array of length n.
// If no solution exists, return an empty array.
-#line 1151 "runarray.in"
+#line 1126 "runarray.in"
// realarray* solve(realarray2 *a, realarray *b, bool warn=true);
-void gen_runarray50(stack *Stack)
+void gen_runarray48(stack *Stack)
{
bool warn=vm::pop<bool>(Stack,true);
realarray * b=vm::pop<realarray *>(Stack);
realarray2 * a=vm::pop<realarray2 *>(Stack);
-#line 1152 "runarray.in"
+#line 1127 "runarray.in"
size_t n=checkArray(a);
if(n == 0) {Stack->push<realarray*>(new array(0)); return;}
@@ -1447,14 +1418,14 @@ void gen_runarray50(stack *Stack)
// Solve the linear equation ax=b by LU decomposition, returning the
// solution x, where a is an n x n matrix and b is an n x m matrix.
// If no solution exists, return an empty array.
-#line 1204 "runarray.in"
+#line 1179 "runarray.in"
// realarray2* solve(realarray2 *a, realarray2 *b, bool warn=true);
-void gen_runarray51(stack *Stack)
+void gen_runarray49(stack *Stack)
{
bool warn=vm::pop<bool>(Stack,true);
realarray2 * b=vm::pop<realarray2 *>(Stack);
realarray2 * a=vm::pop<realarray2 *>(Stack);
-#line 1205 "runarray.in"
+#line 1180 "runarray.in"
size_t n=checkArray(a);
if(n == 0) {Stack->push<realarray2*>(new array(0)); return;}
@@ -1516,12 +1487,12 @@ void gen_runarray51(stack *Stack)
}
// Compute the determinant of an n x n matrix.
-#line 1267 "runarray.in"
+#line 1242 "runarray.in"
// real determinant(realarray2 *a);
-void gen_runarray52(stack *Stack)
+void gen_runarray50(stack *Stack)
{
realarray2 * a=vm::pop<realarray2 *>(Stack);
-#line 1268 "runarray.in"
+#line 1243 "runarray.in"
real *A;
copyArray2C(A,a);
size_t n=checkArray(a);
@@ -1536,13 +1507,13 @@ void gen_runarray52(stack *Stack)
{Stack->push<real>(det); return;}
}
-#line 1283 "runarray.in"
+#line 1258 "runarray.in"
// realarray* *(realarray2 *a, realarray *b);
-void gen_runarray53(stack *Stack)
+void gen_runarray51(stack *Stack)
{
realarray * b=vm::pop<realarray *>(Stack);
realarray2 * a=vm::pop<realarray2 *>(Stack);
-#line 1284 "runarray.in"
+#line 1259 "runarray.in"
size_t n=checkArray(a);
size_t m=checkArray(b);
array *c=new array(n);
@@ -1560,13 +1531,13 @@ void gen_runarray53(stack *Stack)
{Stack->push<realarray*>(c); return;}
}
-#line 1302 "runarray.in"
+#line 1277 "runarray.in"
// realarray* *(realarray *a, realarray2 *b);
-void gen_runarray54(stack *Stack)
+void gen_runarray52(stack *Stack)
{
realarray2 * b=vm::pop<realarray2 *>(Stack);
realarray * a=vm::pop<realarray *>(Stack);
-#line 1303 "runarray.in"
+#line 1278 "runarray.in"
size_t n=checkArray(a);
if(n != checkArray(b)) error(incommensurate);
real *A;
@@ -1594,53 +1565,53 @@ void gen_runarray54(stack *Stack)
{Stack->push<realarray*>(c); return;}
}
-#line 1331 "runarray.in"
+#line 1306 "runarray.in"
// Intarray2* *(Intarray2 *a, Intarray2 *b);
-void gen_runarray55(stack *Stack)
+void gen_runarray53(stack *Stack)
{
Intarray2 * b=vm::pop<Intarray2 *>(Stack);
Intarray2 * a=vm::pop<Intarray2 *>(Stack);
-#line 1332 "runarray.in"
+#line 1307 "runarray.in"
{Stack->push<Intarray2*>(mult<Int>(a,b)); return;}
}
-#line 1336 "runarray.in"
+#line 1311 "runarray.in"
// realarray2* *(realarray2 *a, realarray2 *b);
-void gen_runarray56(stack *Stack)
+void gen_runarray54(stack *Stack)
{
realarray2 * b=vm::pop<realarray2 *>(Stack);
realarray2 * a=vm::pop<realarray2 *>(Stack);
-#line 1337 "runarray.in"
+#line 1312 "runarray.in"
{Stack->push<realarray2*>(mult<real>(a,b)); return;}
}
-#line 1341 "runarray.in"
+#line 1316 "runarray.in"
// pairarray2* *(pairarray2 *a, pairarray2 *b);
-void gen_runarray57(stack *Stack)
+void gen_runarray55(stack *Stack)
{
pairarray2 * b=vm::pop<pairarray2 *>(Stack);
pairarray2 * a=vm::pop<pairarray2 *>(Stack);
-#line 1342 "runarray.in"
+#line 1317 "runarray.in"
{Stack->push<pairarray2*>(mult<pair>(a,b)); return;}
}
-#line 1346 "runarray.in"
+#line 1321 "runarray.in"
// triple *(realarray2 *t, triple v);
-void gen_runarray58(stack *Stack)
+void gen_runarray56(stack *Stack)
{
triple v=vm::pop<triple>(Stack);
realarray2 * t=vm::pop<realarray2 *>(Stack);
-#line 1347 "runarray.in"
+#line 1322 "runarray.in"
{Stack->push<triple>(*t*v); return;}
}
-#line 1351 "runarray.in"
+#line 1326 "runarray.in"
// pair project(triple v, realarray2 *t);
-void gen_runarray59(stack *Stack)
+void gen_runarray57(stack *Stack)
{
realarray2 * t=vm::pop<realarray2 *>(Stack);
triple v=vm::pop<triple>(Stack);
-#line 1352 "runarray.in"
+#line 1327 "runarray.in"
size_t n=checkArray(t);
if(n != 4) error(incommensurate);
array *t0=read<array*>(t,0);
@@ -1665,13 +1636,13 @@ void gen_runarray59(stack *Stack)
}
// Compute the dot product of vectors a and b.
-#line 1377 "runarray.in"
+#line 1352 "runarray.in"
// real dot(realarray *a, realarray *b);
-void gen_runarray60(stack *Stack)
+void gen_runarray58(stack *Stack)
{
realarray * b=vm::pop<realarray *>(Stack);
realarray * a=vm::pop<realarray *>(Stack);
-#line 1378 "runarray.in"
+#line 1353 "runarray.in"
size_t n=checkArrays(a,b);
real sum=0.0;
for(size_t i=0; i < n; ++i)
@@ -1680,13 +1651,13 @@ void gen_runarray60(stack *Stack)
}
// Compute the complex dot product of vectors a and b.
-#line 1387 "runarray.in"
+#line 1362 "runarray.in"
// pair dot(pairarray *a, pairarray *b);
-void gen_runarray61(stack *Stack)
+void gen_runarray59(stack *Stack)
{
pairarray * b=vm::pop<pairarray *>(Stack);
pairarray * a=vm::pop<pairarray *>(Stack);
-#line 1388 "runarray.in"
+#line 1363 "runarray.in"
size_t n=checkArrays(a,b);
pair sum=zero;
for(size_t i=0; i < n; ++i)
@@ -1701,15 +1672,15 @@ void gen_runarray61(stack *Stack)
// [ a[2] b[2] c[2] ]
// [ ... ]
// [ c[n-1] a[n-1] b[n-1] ]
-#line 1403 "runarray.in"
+#line 1378 "runarray.in"
// realarray* tridiagonal(realarray *a, realarray *b, realarray *c, realarray *f);
-void gen_runarray62(stack *Stack)
+void gen_runarray60(stack *Stack)
{
realarray * f=vm::pop<realarray *>(Stack);
realarray * c=vm::pop<realarray *>(Stack);
realarray * b=vm::pop<realarray *>(Stack);
realarray * a=vm::pop<realarray *>(Stack);
-#line 1404 "runarray.in"
+#line 1379 "runarray.in"
size_t n=checkArrays(a,b);
checkEqual(n,checkArray(c));
checkEqual(n,checkArray(f));
@@ -1806,16 +1777,16 @@ void gen_runarray62(stack *Stack)
}
// Root solve by Newton-Raphson
-#line 1501 "runarray.in"
+#line 1476 "runarray.in"
// real newton(Int iterations=100, callableReal *f, callableReal *fprime, real x, bool verbose=false);
-void gen_runarray63(stack *Stack)
+void gen_runarray61(stack *Stack)
{
bool verbose=vm::pop<bool>(Stack,false);
real x=vm::pop<real>(Stack);
callableReal * fprime=vm::pop<callableReal *>(Stack);
callableReal * f=vm::pop<callableReal *>(Stack);
Int iterations=vm::pop<Int>(Stack,100);
-#line 1503 "runarray.in"
+#line 1478 "runarray.in"
static const real fuzz=1000.0*DBL_EPSILON;
Int i=0;
size_t oldPrec=0;
@@ -1861,9 +1832,9 @@ void gen_runarray63(stack *Stack)
// Root solve by Newton-Raphson bisection
// cf. routine rtsafe (Press et al., Numerical Recipes, 1991).
-#line 1549 "runarray.in"
+#line 1524 "runarray.in"
// real newton(Int iterations=100, callableReal *f, callableReal *fprime, real x1, real x2, bool verbose=false);
-void gen_runarray64(stack *Stack)
+void gen_runarray62(stack *Stack)
{
bool verbose=vm::pop<bool>(Stack,false);
real x2=vm::pop<real>(Stack);
@@ -1871,7 +1842,7 @@ void gen_runarray64(stack *Stack)
callableReal * fprime=vm::pop<callableReal *>(Stack);
callableReal * f=vm::pop<callableReal *>(Stack);
Int iterations=vm::pop<Int>(Stack,100);
-#line 1551 "runarray.in"
+#line 1526 "runarray.in"
static const real fuzz=1000.0*DBL_EPSILON;
size_t oldPrec=0;
if(verbose)
@@ -1949,16 +1920,16 @@ void gen_runarray64(stack *Stack)
{Stack->push<real>((j == iterations) ? DBL_MAX : x); return;}
}
-#line 1629 "runarray.in"
+#line 1604 "runarray.in"
// real simpson(callableReal *f, real a, real b, real acc=DBL_EPSILON, real dxmax=0);
-void gen_runarray65(stack *Stack)
+void gen_runarray63(stack *Stack)
{
real dxmax=vm::pop<real>(Stack,0);
real acc=vm::pop<real>(Stack,DBL_EPSILON);
real b=vm::pop<real>(Stack);
real a=vm::pop<real>(Stack);
callableReal * f=vm::pop<callableReal *>(Stack);
-#line 1631 "runarray.in"
+#line 1606 "runarray.in"
real integral;
if(dxmax <= 0) dxmax=fabs(b-a);
Func=f;
@@ -1969,13 +1940,13 @@ void gen_runarray65(stack *Stack)
}
// Compute the fast Fourier transform of a pair array
-#line 1642 "runarray.in"
+#line 1617 "runarray.in"
// pairarray* fft(pairarray *a, Int sign=1);
-void gen_runarray66(stack *Stack)
+void gen_runarray64(stack *Stack)
{
Int sign=vm::pop<Int>(Stack,1);
pairarray * a=vm::pop<pairarray *>(Stack);
-#line 1643 "runarray.in"
+#line 1618 "runarray.in"
unsigned n=(unsigned) checkArray(a);
#ifdef HAVE_LIBFFTW3
array *c=new array(n);
@@ -2004,12 +1975,12 @@ void gen_runarray66(stack *Stack)
{Stack->push<pairarray*>(c); return;}
}
-#line 1672 "runarray.in"
+#line 1647 "runarray.in"
// Intarray2* triangulate(pairarray *z);
-void gen_runarray67(stack *Stack)
+void gen_runarray65(stack *Stack)
{
pairarray * z=vm::pop<pairarray *>(Stack);
-#line 1673 "runarray.in"
+#line 1648 "runarray.in"
size_t nv=checkArray(z);
// Call robust version of Gilles Dumoulin's port of Paul Bourke's
// triangulation code.
@@ -2043,12 +2014,12 @@ void gen_runarray67(stack *Stack)
{Stack->push<Intarray2*>(t); return;}
}
-#line 1707 "runarray.in"
+#line 1682 "runarray.in"
// real norm(realarray *a);
-void gen_runarray68(stack *Stack)
+void gen_runarray66(stack *Stack)
{
realarray * a=vm::pop<realarray *>(Stack);
-#line 1708 "runarray.in"
+#line 1683 "runarray.in"
size_t n=checkArray(a);
real M=0.0;
for(size_t i=0; i < n; ++i) {
@@ -2058,12 +2029,12 @@ void gen_runarray68(stack *Stack)
{Stack->push<real>(M); return;}
}
-#line 1718 "runarray.in"
+#line 1693 "runarray.in"
// real norm(realarray2 *a);
-void gen_runarray69(stack *Stack)
+void gen_runarray67(stack *Stack)
{
realarray2 * a=vm::pop<realarray2 *>(Stack);
-#line 1719 "runarray.in"
+#line 1694 "runarray.in"
size_t n=checkArray(a);
real M=0.0;
for(size_t i=0; i < n; ++i) {
@@ -2077,12 +2048,12 @@ void gen_runarray69(stack *Stack)
{Stack->push<real>(M); return;}
}
-#line 1733 "runarray.in"
+#line 1708 "runarray.in"
// real norm(triplearray2 *a);
-void gen_runarray70(stack *Stack)
+void gen_runarray68(stack *Stack)
{
triplearray2 * a=vm::pop<triplearray2 *>(Stack);
-#line 1734 "runarray.in"
+#line 1709 "runarray.in"
size_t n=checkArray(a);
real M=0.0;
for(size_t i=0; i < n; ++i) {
@@ -2096,12 +2067,12 @@ void gen_runarray70(stack *Stack)
{Stack->push<real>(sqrt(M)); return;}
}
-#line 1748 "runarray.in"
+#line 1723 "runarray.in"
// real change2(triplearray2 *a);
-void gen_runarray71(stack *Stack)
+void gen_runarray69(stack *Stack)
{
triplearray2 * a=vm::pop<triplearray2 *>(Stack);
-#line 1749 "runarray.in"
+#line 1724 "runarray.in"
size_t n=checkArray(a);
if(n == 0) {Stack->push<real>(0.0); return;}
@@ -2122,13 +2093,13 @@ void gen_runarray71(stack *Stack)
{Stack->push<real>(M); return;}
}
-#line 1770 "runarray.in"
+#line 1745 "runarray.in"
// triple minbezier(triplearray2 *P, triple b);
-void gen_runarray72(stack *Stack)
+void gen_runarray70(stack *Stack)
{
triple b=vm::pop<triple>(Stack);
triplearray2 * P=vm::pop<triplearray2 *>(Stack);
-#line 1771 "runarray.in"
+#line 1746 "runarray.in"
real *A=copyTripleArray2Components(P,true,4);
b=triple(bound(A,::min,b.getx(),sqrtFuzz*norm(A,16)),
bound(A+16,::min,b.gety(),sqrtFuzz*norm(A+16,16)),
@@ -2137,13 +2108,13 @@ void gen_runarray72(stack *Stack)
{Stack->push<triple>(b); return;}
}
-#line 1780 "runarray.in"
+#line 1755 "runarray.in"
// triple maxbezier(triplearray2 *P, triple b);
-void gen_runarray73(stack *Stack)
+void gen_runarray71(stack *Stack)
{
triple b=vm::pop<triple>(Stack);
triplearray2 * P=vm::pop<triplearray2 *>(Stack);
-#line 1781 "runarray.in"
+#line 1756 "runarray.in"
real *A=copyTripleArray2Components(P,true,4);
b=triple(bound(A,::max,b.getx(),sqrtFuzz*norm(A,16)),
bound(A+16,::max,b.gety(),sqrtFuzz*norm(A+16,16)),
@@ -2152,13 +2123,13 @@ void gen_runarray73(stack *Stack)
{Stack->push<triple>(b); return;}
}
-#line 1790 "runarray.in"
+#line 1765 "runarray.in"
// pair minratio(triplearray2 *P, pair b);
-void gen_runarray74(stack *Stack)
+void gen_runarray72(stack *Stack)
{
pair b=vm::pop<pair>(Stack);
triplearray2 * P=vm::pop<triplearray2 *>(Stack);
-#line 1791 "runarray.in"
+#line 1766 "runarray.in"
triple *A;
copyArray2C(A,P,true,4);
real fuzz=sqrtFuzz*norm(A,16);
@@ -2168,13 +2139,13 @@ void gen_runarray74(stack *Stack)
{Stack->push<pair>(b); return;}
}
-#line 1801 "runarray.in"
+#line 1776 "runarray.in"
// pair maxratio(triplearray2 *P, pair b);
-void gen_runarray75(stack *Stack)
+void gen_runarray73(stack *Stack)
{
pair b=vm::pop<pair>(Stack);
triplearray2 * P=vm::pop<triplearray2 *>(Stack);
-#line 1802 "runarray.in"
+#line 1777 "runarray.in"
triple *A;
copyArray2C(A,P,true,4);
real fuzz=sqrtFuzz*norm(A,16);
@@ -2184,11 +2155,11 @@ void gen_runarray75(stack *Stack)
{Stack->push<pair>(b); return;}
}
-#line 1812 "runarray.in"
+#line 1787 "runarray.in"
// realarray* _projection();
-void gen_runarray76(stack *Stack)
+void gen_runarray74(stack *Stack)
{
-#line 1813 "runarray.in"
+#line 1788 "runarray.in"
#ifdef HAVE_GL
array *a=new array(14);
gl::projection P=gl::camera();
@@ -2225,160 +2196,156 @@ namespace trans {
void gen_runarray_venv(venv &ve)
{
-#line 445 "runarray.in"
+#line 424 "runarray.in"
REGISTER_BLTIN(run::emptyArray,"emptyArray");
-#line 451 "runarray.in"
+#line 430 "runarray.in"
REGISTER_BLTIN(run::newDeepArray,"newDeepArray");
-#line 473 "runarray.in"
+#line 452 "runarray.in"
REGISTER_BLTIN(run::newInitializedArray,"newInitializedArray");
-#line 488 "runarray.in"
+#line 467 "runarray.in"
REGISTER_BLTIN(run::newAppendedArray,"newAppendedArray");
-#line 504 "runarray.in"
+#line 483 "runarray.in"
+ REGISTER_BLTIN(run::copyArrayValue,"copyArrayValue");
+#line 495 "runarray.in"
REGISTER_BLTIN(run::copyArray,"copyArray");
-#line 516 "runarray.in"
+#line 506 "runarray.in"
REGISTER_BLTIN(run::arrayRead,"arrayRead");
-#line 528 "runarray.in"
+#line 518 "runarray.in"
REGISTER_BLTIN(run::arraySliceRead,"arraySliceRead");
-#line 535 "runarray.in"
+#line 525 "runarray.in"
REGISTER_BLTIN(run::arraySliceReadToEnd,"arraySliceReadToEnd");
-#line 543 "runarray.in"
+#line 533 "runarray.in"
REGISTER_BLTIN(run::arrayArrayRead,"arrayArrayRead");
-#line 552 "runarray.in"
+#line 542 "runarray.in"
REGISTER_BLTIN(run::arrayWrite,"arrayWrite");
-#line 569 "runarray.in"
+#line 559 "runarray.in"
REGISTER_BLTIN(run::arraySliceWrite,"arraySliceWrite");
-#line 577 "runarray.in"
+#line 567 "runarray.in"
REGISTER_BLTIN(run::arraySliceWriteToEnd,"arraySliceWriteToEnd");
-#line 585 "runarray.in"
+#line 575 "runarray.in"
REGISTER_BLTIN(run::arrayLength,"arrayLength");
-#line 591 "runarray.in"
+#line 581 "runarray.in"
REGISTER_BLTIN(run::arrayKeys,"arrayKeys");
-#line 606 "runarray.in"
+#line 596 "runarray.in"
REGISTER_BLTIN(run::arrayCyclicFlag,"arrayCyclicFlag");
-#line 613 "runarray.in"
+#line 603 "runarray.in"
REGISTER_BLTIN(run::arraySetCyclicFlag,"arraySetCyclicFlag");
-#line 620 "runarray.in"
+#line 610 "runarray.in"
REGISTER_BLTIN(run::arrayInitializedHelper,"arrayInitializedHelper");
-#line 631 "runarray.in"
+#line 621 "runarray.in"
REGISTER_BLTIN(run::arrayInitialized,"arrayInitialized");
-#line 637 "runarray.in"
+#line 627 "runarray.in"
REGISTER_BLTIN(run::arrayCyclicHelper,"arrayCyclicHelper");
-#line 644 "runarray.in"
+#line 634 "runarray.in"
REGISTER_BLTIN(run::arrayCyclic,"arrayCyclic");
-#line 650 "runarray.in"
+#line 640 "runarray.in"
REGISTER_BLTIN(run::arrayPushHelper,"arrayPushHelper");
-#line 658 "runarray.in"
+#line 648 "runarray.in"
REGISTER_BLTIN(run::arrayPush,"arrayPush");
-#line 664 "runarray.in"
+#line 654 "runarray.in"
REGISTER_BLTIN(run::arrayAppendHelper,"arrayAppendHelper");
-#line 673 "runarray.in"
+#line 663 "runarray.in"
REGISTER_BLTIN(run::arrayAppend,"arrayAppend");
-#line 679 "runarray.in"
+#line 669 "runarray.in"
REGISTER_BLTIN(run::arrayPopHelper,"arrayPopHelper");
-#line 688 "runarray.in"
+#line 678 "runarray.in"
REGISTER_BLTIN(run::arrayPop,"arrayPop");
-#line 694 "runarray.in"
+#line 684 "runarray.in"
REGISTER_BLTIN(run::arrayInsertHelper,"arrayInsertHelper");
-#line 705 "runarray.in"
+#line 695 "runarray.in"
REGISTER_BLTIN(run::arrayInsert,"arrayInsert");
-#line 711 "runarray.in"
+#line 701 "runarray.in"
REGISTER_BLTIN(run::arrayDelete,"arrayDelete");
-#line 717 "runarray.in"
+#line 707 "runarray.in"
REGISTER_BLTIN(run::arrayAlias,"arrayAlias");
-#line 722 "runarray.in"
+#line 712 "runarray.in"
REGISTER_BLTIN(run::arrayIntArray,"arrayIntArray");
-#line 740 "runarray.in"
- addFunc(ve, run::gen_runarray31, IntArray(), SYM(complement), formal(IntArray(), SYM(a), false, false), formal(primInt(), SYM(n), false, false));
-#line 759 "runarray.in"
+#line 730 "runarray.in"
+ addFunc(ve, run::gen_runarray32, IntArray(), SYM(complement), formal(IntArray(), SYM(a), false, false), formal(primInt(), SYM(n), false, false));
+#line 749 "runarray.in"
REGISTER_BLTIN(run::arraySequence,"arraySequence");
-#line 772 "runarray.in"
- addFunc(ve, run::gen_runarray33, IntArray(), SYM(sequence), formal(primInt(), SYM(n), false, false));
-#line 783 "runarray.in"
+#line 762 "runarray.in"
+ addFunc(ve, run::gen_runarray34, IntArray(), SYM(sequence), formal(primInt(), SYM(n), false, false));
+#line 773 "runarray.in"
REGISTER_BLTIN(run::arrayFunction,"arrayFunction");
-#line 796 "runarray.in"
+#line 786 "runarray.in"
REGISTER_BLTIN(run::arraySort,"arraySort");
-#line 805 "runarray.in"
+#line 795 "runarray.in"
REGISTER_BLTIN(run::arraySearch,"arraySearch");
-#line 824 "runarray.in"
- addFunc(ve, run::gen_runarray37, primBoolean(), SYM(all), formal(booleanArray(), SYM(a), false, false));
-#line 833 "runarray.in"
- addFunc(ve, run::gen_runarray38, booleanArray(), SYM_LOGNOT, formal(booleanArray(), SYM(a), false, false));
-#line 842 "runarray.in"
- addFunc(ve, run::gen_runarray39, primInt(), SYM(sum), formal(booleanArray(), SYM(a), false, false));
-#line 851 "runarray.in"
- REGISTER_BLTIN(run::arrayCopy,"arrayCopy");
-#line 856 "runarray.in"
+#line 814 "runarray.in"
+ addFunc(ve, run::gen_runarray38, primBoolean(), SYM(all), formal(booleanArray(), SYM(a), false, false));
+#line 823 "runarray.in"
+ addFunc(ve, run::gen_runarray39, booleanArray(), SYM_LOGNOT, formal(booleanArray(), SYM(a), false, false));
+#line 832 "runarray.in"
+ addFunc(ve, run::gen_runarray40, primInt(), SYM(sum), formal(booleanArray(), SYM(a), false, false));
+#line 841 "runarray.in"
REGISTER_BLTIN(run::arrayConcat,"arrayConcat");
-#line 884 "runarray.in"
- REGISTER_BLTIN(run::array2Copy,"array2Copy");
-#line 889 "runarray.in"
- REGISTER_BLTIN(run::array3Copy,"array3Copy");
-#line 894 "runarray.in"
+#line 869 "runarray.in"
REGISTER_BLTIN(run::array2Transpose,"array2Transpose");
-#line 918 "runarray.in"
+#line 893 "runarray.in"
REGISTER_BLTIN(run::array3Transpose,"array3Transpose");
-#line 1005 "runarray.in"
- addFunc(ve, run::gen_runarray46, primInt(), SYM(find), formal(booleanArray(), SYM(a), false, false), formal(primInt(), SYM(n), true, false));
-#line 1024 "runarray.in"
+#line 980 "runarray.in"
+ addFunc(ve, run::gen_runarray44, primInt(), SYM(find), formal(booleanArray(), SYM(a), false, false), formal(primInt(), SYM(n), true, false));
+#line 999 "runarray.in"
REGISTER_BLTIN(run::arrayConditional,"arrayConditional");
-#line 1050 "runarray.in"
- addFunc(ve, run::gen_runarray48, realArray2(), SYM(identity), formal(primInt(), SYM(n), false, false));
-#line 1056 "runarray.in"
- addFunc(ve, run::gen_runarray49, realArray2(), SYM(inverse), formal(realArray2(), SYM(a), false, false));
-#line 1148 "runarray.in"
- addFunc(ve, run::gen_runarray50, realArray(), SYM(solve), formal(realArray2(), SYM(a), false, false), formal(realArray(), SYM(b), false, false), formal(primBoolean(), SYM(warn), true, false));
-#line 1201 "runarray.in"
- addFunc(ve, run::gen_runarray51, realArray2(), SYM(solve), formal(realArray2(), SYM(a), false, false), formal(realArray2(), SYM(b), false, false), formal(primBoolean(), SYM(warn), true, false));
-#line 1266 "runarray.in"
- addFunc(ve, run::gen_runarray52, primReal(), SYM(determinant), formal(realArray2(), SYM(a), false, false));
-#line 1283 "runarray.in"
- addFunc(ve, run::gen_runarray53, realArray(), SYM_TIMES, formal(realArray2(), SYM(a), false, false), formal(realArray(), SYM(b), false, false));
-#line 1302 "runarray.in"
- addFunc(ve, run::gen_runarray54, realArray(), SYM_TIMES, formal(realArray(), SYM(a), false, false), formal(realArray2(), SYM(b), false, false));
-#line 1331 "runarray.in"
- addFunc(ve, run::gen_runarray55, IntArray2(), SYM_TIMES, formal(IntArray2(), SYM(a), false, false), formal(IntArray2(), SYM(b), false, false));
-#line 1336 "runarray.in"
- addFunc(ve, run::gen_runarray56, realArray2(), SYM_TIMES, formal(realArray2(), SYM(a), false, false), formal(realArray2(), SYM(b), false, false));
-#line 1341 "runarray.in"
- addFunc(ve, run::gen_runarray57, pairArray2(), SYM_TIMES, formal(pairArray2(), SYM(a), false, false), formal(pairArray2(), SYM(b), false, false));
-#line 1346 "runarray.in"
- addFunc(ve, run::gen_runarray58, primTriple(), SYM_TIMES, formal(realArray2(), SYM(t), false, false), formal(primTriple(), SYM(v), false, false));
+#line 1025 "runarray.in"
+ addFunc(ve, run::gen_runarray46, realArray2(), SYM(identity), formal(primInt(), SYM(n), false, false));
+#line 1031 "runarray.in"
+ addFunc(ve, run::gen_runarray47, realArray2(), SYM(inverse), formal(realArray2(), SYM(a), false, false));
+#line 1123 "runarray.in"
+ addFunc(ve, run::gen_runarray48, realArray(), SYM(solve), formal(realArray2(), SYM(a), false, false), formal(realArray(), SYM(b), false, false), formal(primBoolean(), SYM(warn), true, false));
+#line 1176 "runarray.in"
+ addFunc(ve, run::gen_runarray49, realArray2(), SYM(solve), formal(realArray2(), SYM(a), false, false), formal(realArray2(), SYM(b), false, false), formal(primBoolean(), SYM(warn), true, false));
+#line 1241 "runarray.in"
+ addFunc(ve, run::gen_runarray50, primReal(), SYM(determinant), formal(realArray2(), SYM(a), false, false));
+#line 1258 "runarray.in"
+ addFunc(ve, run::gen_runarray51, realArray(), SYM_TIMES, formal(realArray2(), SYM(a), false, false), formal(realArray(), SYM(b), false, false));
+#line 1277 "runarray.in"
+ addFunc(ve, run::gen_runarray52, realArray(), SYM_TIMES, formal(realArray(), SYM(a), false, false), formal(realArray2(), SYM(b), false, false));
+#line 1306 "runarray.in"
+ addFunc(ve, run::gen_runarray53, IntArray2(), SYM_TIMES, formal(IntArray2(), SYM(a), false, false), formal(IntArray2(), SYM(b), false, false));
+#line 1311 "runarray.in"
+ addFunc(ve, run::gen_runarray54, realArray2(), SYM_TIMES, formal(realArray2(), SYM(a), false, false), formal(realArray2(), SYM(b), false, false));
+#line 1316 "runarray.in"
+ addFunc(ve, run::gen_runarray55, pairArray2(), SYM_TIMES, formal(pairArray2(), SYM(a), false, false), formal(pairArray2(), SYM(b), false, false));
+#line 1321 "runarray.in"
+ addFunc(ve, run::gen_runarray56, primTriple(), SYM_TIMES, formal(realArray2(), SYM(t), false, false), formal(primTriple(), SYM(v), false, false));
+#line 1326 "runarray.in"
+ addFunc(ve, run::gen_runarray57, primPair(), SYM(project), formal(primTriple(), SYM(v), false, false), formal(realArray2(), SYM(t), false, false));
#line 1351 "runarray.in"
- addFunc(ve, run::gen_runarray59, primPair(), SYM(project), formal(primTriple(), SYM(v), false, false), formal(realArray2(), SYM(t), false, false));
-#line 1376 "runarray.in"
- addFunc(ve, run::gen_runarray60, primReal(), SYM(dot), formal(realArray(), SYM(a), false, false), formal(realArray(), SYM(b), false, false));
-#line 1386 "runarray.in"
- addFunc(ve, run::gen_runarray61, primPair(), SYM(dot), formal(pairArray(), SYM(a), false, false), formal(pairArray(), SYM(b), false, false));
-#line 1396 "runarray.in"
- addFunc(ve, run::gen_runarray62, realArray(), SYM(tridiagonal), formal(realArray(), SYM(a), false, false), formal(realArray(), SYM(b), false, false), formal(realArray(), SYM(c), false, false), formal(realArray(), SYM(f), false, false));
-#line 1500 "runarray.in"
- addFunc(ve, run::gen_runarray63, primReal(), SYM(newton), formal(primInt(), SYM(iterations), true, false), formal(realRealFunction(), SYM(f), false, false), formal(realRealFunction(), SYM(fprime), false, false), formal(primReal(), SYM(x), false, false), formal(primBoolean(), SYM(verbose), true, false));
-#line 1547 "runarray.in"
- addFunc(ve, run::gen_runarray64, primReal(), SYM(newton), formal(primInt(), SYM(iterations), true, false), formal(realRealFunction(), SYM(f), false, false), formal(realRealFunction(), SYM(fprime), false, false), formal(primReal(), SYM(x1), false, false), formal(primReal(), SYM(x2), false, false), formal(primBoolean(), SYM(verbose), true, false));
-#line 1629 "runarray.in"
- addFunc(ve, run::gen_runarray65, primReal(), SYM(simpson), formal(realRealFunction(), SYM(f), false, false), formal(primReal(), SYM(a), false, false), formal(primReal(), SYM(b), false, false), formal(primReal(), SYM(acc), true, false), formal(primReal(), SYM(dxmax), true, false));
-#line 1641 "runarray.in"
- addFunc(ve, run::gen_runarray66, pairArray(), SYM(fft), formal(pairArray(), SYM(a), false, false), formal(primInt(), SYM(sign), true, false));
-#line 1672 "runarray.in"
- addFunc(ve, run::gen_runarray67, IntArray2(), SYM(triangulate), formal(pairArray(), SYM(z), false, false));
-#line 1707 "runarray.in"
- addFunc(ve, run::gen_runarray68, primReal(), SYM(norm), formal(realArray(), SYM(a), false, false));
-#line 1718 "runarray.in"
- addFunc(ve, run::gen_runarray69, primReal(), SYM(norm), formal(realArray2(), SYM(a), false, false));
-#line 1733 "runarray.in"
- addFunc(ve, run::gen_runarray70, primReal(), SYM(norm), formal(tripleArray2(), SYM(a), false, false));
-#line 1748 "runarray.in"
- addFunc(ve, run::gen_runarray71, primReal(), SYM(change2), formal(tripleArray2(), SYM(a), false, false));
-#line 1770 "runarray.in"
- addFunc(ve, run::gen_runarray72, primTriple(), SYM(minbezier), formal(tripleArray2(), SYM(p), false, false), formal(primTriple(), SYM(b), false, false));
-#line 1780 "runarray.in"
- addFunc(ve, run::gen_runarray73, primTriple(), SYM(maxbezier), formal(tripleArray2(), SYM(p), false, false), formal(primTriple(), SYM(b), false, false));
-#line 1790 "runarray.in"
- addFunc(ve, run::gen_runarray74, primPair(), SYM(minratio), formal(tripleArray2(), SYM(p), false, false), formal(primPair(), SYM(b), false, false));
-#line 1801 "runarray.in"
- addFunc(ve, run::gen_runarray75, primPair(), SYM(maxratio), formal(tripleArray2(), SYM(p), false, false), formal(primPair(), SYM(b), false, false));
-#line 1812 "runarray.in"
- addFunc(ve, run::gen_runarray76, realArray(), SYM(_projection));
+ addFunc(ve, run::gen_runarray58, primReal(), SYM(dot), formal(realArray(), SYM(a), false, false), formal(realArray(), SYM(b), false, false));
+#line 1361 "runarray.in"
+ addFunc(ve, run::gen_runarray59, primPair(), SYM(dot), formal(pairArray(), SYM(a), false, false), formal(pairArray(), SYM(b), false, false));
+#line 1371 "runarray.in"
+ addFunc(ve, run::gen_runarray60, realArray(), SYM(tridiagonal), formal(realArray(), SYM(a), false, false), formal(realArray(), SYM(b), false, false), formal(realArray(), SYM(c), false, false), formal(realArray(), SYM(f), false, false));
+#line 1475 "runarray.in"
+ addFunc(ve, run::gen_runarray61, primReal(), SYM(newton), formal(primInt(), SYM(iterations), true, false), formal(realRealFunction(), SYM(f), false, false), formal(realRealFunction(), SYM(fprime), false, false), formal(primReal(), SYM(x), false, false), formal(primBoolean(), SYM(verbose), true, false));
+#line 1522 "runarray.in"
+ addFunc(ve, run::gen_runarray62, primReal(), SYM(newton), formal(primInt(), SYM(iterations), true, false), formal(realRealFunction(), SYM(f), false, false), formal(realRealFunction(), SYM(fprime), false, false), formal(primReal(), SYM(x1), false, false), formal(primReal(), SYM(x2), false, false), formal(primBoolean(), SYM(verbose), true, false));
+#line 1604 "runarray.in"
+ addFunc(ve, run::gen_runarray63, primReal(), SYM(simpson), formal(realRealFunction(), SYM(f), false, false), formal(primReal(), SYM(a), false, false), formal(primReal(), SYM(b), false, false), formal(primReal(), SYM(acc), true, false), formal(primReal(), SYM(dxmax), true, false));
+#line 1616 "runarray.in"
+ addFunc(ve, run::gen_runarray64, pairArray(), SYM(fft), formal(pairArray(), SYM(a), false, false), formal(primInt(), SYM(sign), true, false));
+#line 1647 "runarray.in"
+ addFunc(ve, run::gen_runarray65, IntArray2(), SYM(triangulate), formal(pairArray(), SYM(z), false, false));
+#line 1682 "runarray.in"
+ addFunc(ve, run::gen_runarray66, primReal(), SYM(norm), formal(realArray(), SYM(a), false, false));
+#line 1693 "runarray.in"
+ addFunc(ve, run::gen_runarray67, primReal(), SYM(norm), formal(realArray2(), SYM(a), false, false));
+#line 1708 "runarray.in"
+ addFunc(ve, run::gen_runarray68, primReal(), SYM(norm), formal(tripleArray2(), SYM(a), false, false));
+#line 1723 "runarray.in"
+ addFunc(ve, run::gen_runarray69, primReal(), SYM(change2), formal(tripleArray2(), SYM(a), false, false));
+#line 1745 "runarray.in"
+ addFunc(ve, run::gen_runarray70, primTriple(), SYM(minbezier), formal(tripleArray2(), SYM(p), false, false), formal(primTriple(), SYM(b), false, false));
+#line 1755 "runarray.in"
+ addFunc(ve, run::gen_runarray71, primTriple(), SYM(maxbezier), formal(tripleArray2(), SYM(p), false, false), formal(primTriple(), SYM(b), false, false));
+#line 1765 "runarray.in"
+ addFunc(ve, run::gen_runarray72, primPair(), SYM(minratio), formal(tripleArray2(), SYM(p), false, false), formal(primPair(), SYM(b), false, false));
+#line 1776 "runarray.in"
+ addFunc(ve, run::gen_runarray73, primPair(), SYM(maxratio), formal(tripleArray2(), SYM(p), false, false), formal(primPair(), SYM(b), false, false));
+#line 1787 "runarray.in"
+ addFunc(ve, run::gen_runarray74, realArray(), SYM(_projection));
}
} // namespace trans