Help!: Printing out all monotonic functions

Dear Cplusplus friends,

I am a rookie in C++ programming language who is trying to learn the C++ through working with problems in computational mathematics. Currently, I am trying to print out all monotonic functions, which basically is the following:

function f is monotonic if given f: {1,...,n} -> {1,...,m}, i less than or equal to j implies that f(i) is less than or equal to f(j).

I am not sure how I could begin programming it. Furthermore, I am confused how I could print out all possible monotonic functions that satisfy such condition...Is there a way to list all possible functions satisfying such property?
Is there a way to list all possible functions satisfying such property?


It would take you a little while. There's an infinite number of them.
How can I list all the functions? Meaning how can I make the program to list all possible monotonic functions? I know there is way to determine whether a given function is monotonic or not, but I am confused how I can write C++ code to come up with all possible functions.
the program will run until numerical limits are reached which will take years to run. Its like asking for a program to print all the prime numbers -- you can determine if 1 value is prime, but you could print from now until then end of time and still not print all of them.
Topic archived. No new replies allowed.