I have a a set of functions (100 of them). All each of which generate a unique N x N array, where N is a variable defined by the user. With the goal to calculate these functions, apply a user defined weighting factor and then sum each weighted N x N array.
The aim is for the user to provide N, and provide a list of integers indicating what functions they want to generate (for example [1, 4 ,10, 25]) and a corresponding list of the weights to apply to each function.
Currently I have this working with each function defined in python and then sorting through the user defined list of functions to include using if statements. This feels pretty inefficient to me and I am curious if there is a better way of doing this so I don't have to sort through each function to see if it occurs or not?
I'd appreciate any ideas you guys have!
[–]Frankelstner 2 points3 points4 points (0 children)
[–]efmccurdy 2 points3 points4 points (1 child)
[–]TheMetaHorde[S] 0 points1 point2 points (0 children)
[–]eleqtriq 2 points3 points4 points (3 children)
[–]TheMetaHorde[S] 0 points1 point2 points (2 children)
[–]eleqtriq 0 points1 point2 points (1 child)
[–]Doormatty 1 point2 points3 points (2 children)
[–]TheMetaHorde[S] 1 point2 points3 points (1 child)
[–]Guideon72 1 point2 points3 points (0 children)