(48G,50g) ConvOffs Transform
|
02-27-2019, 02:22 PM
(This post was last modified: 01-22-2020 10:32 PM by John Keith.)
Post: #1
|
|||
|
|||
(48G,50g) ConvOffs Transform
These strangely named integer transforms are generalizations of the method used to create Pascal's triangle and similar number triangles. More information in this thread. The first program takes a list of integers and returns the transformed list, which will be one term longer than the input list.
Updated 1/20/2020 with a shorter and faster version using DOLIST. Code:
For example, given the input list { 1 2 3 4 5 } the program will return row 5 of Pascal's triangle. The next program implements the ConvOffsStoT transform. It calls the program above. This program is basically the same but returns a list of lists which are transforms of sublists of the input list. Given a list of length n, the program will return lists of length 1 through n+1. Code:
As an example, with an input list of { 1 2 3 4 5 } the program will return the first 6 rows (rows 0 through 5) of Pascals triangle. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)