Creating Logical Search Vectors

Peter MerrittAPLLeave a Comment

We are all well aware of the power of manipulating logical vectors. However, those happy-go-lucky users out there just keep pushing the boundaries (and their luck). Some time back, we were presented with a semi-formatted character vector (from several source files) containing code-delimited sets of data, something like:“…OpenCodeF$ text number number more text other ClosingCodeF$ stuff stuff number OpenCodeB$ number … Read More

The Skirting Board Problem

John 'Jake' JacobAPLLeave a Comment

The object of this weeks problem is to find the best way to cut the boards as purchased into lengths of skirting so that joins in the skirting are avoided when fitted to the walls. For example:⍝ from boards in metres b←5.2 4.6 4.3 4.3 4 3.8 ⍝ cut skirts in metres s←3.2 1.2 0.25 0.15 0.15 0.25 1.2 0.8 … Read More