(args)
| 29740 | } |
| 29741 | |
| 29742 | function createSurfaceExtractor(args) { |
| 29743 | function error(msg) { |
| 29744 | throw new Error("ndarray-extract-contour: " + msg) |
| 29745 | } |
| 29746 | if(typeof args !== "object") { |
| 29747 | error("Must specify arguments") |
| 29748 | } |
| 29749 | var order = args.order |
| 29750 | if(!Array.isArray(order)) { |
| 29751 | error("Must specify order") |
| 29752 | } |
| 29753 | var arrays = args.arrayArguments||1 |
| 29754 | if(arrays < 1) { |
| 29755 | error("Must have at least one array argument") |
| 29756 | } |
| 29757 | var scalars = args.scalarArguments||0 |
| 29758 | if(scalars < 0) { |
| 29759 | error("Scalar arg count must be > 0") |
| 29760 | } |
| 29761 | if(typeof args.vertex !== "function") { |
| 29762 | error("Must specify vertex creation function") |
| 29763 | } |
| 29764 | if(typeof args.cell !== "function") { |
| 29765 | error("Must specify cell creation function") |
| 29766 | } |
| 29767 | if(typeof args.phase !== "function") { |
| 29768 | error("Must specify phase function") |
| 29769 | } |
| 29770 | var getters = args.getters || [] |
| 29771 | var typesig = new Array(arrays) |
| 29772 | for(var i=0; i<arrays; ++i) { |
| 29773 | if(getters.indexOf(i) >= 0) { |
| 29774 | typesig[i] = true |
| 29775 | } else { |
| 29776 | typesig[i] = false |
| 29777 | } |
| 29778 | } |
| 29779 | return compileSurfaceProcedure( |
| 29780 | args.vertex, |
| 29781 | args.cell, |
| 29782 | args.phase, |
| 29783 | scalars, |
| 29784 | order, |
| 29785 | typesig) |
| 29786 | } |
| 29787 | |
| 29788 | /***/ }), |
| 29789 |
nothing calls this directly
no test coverage detected
searching dependent graphs…