简体   繁体   中英

Deriving arrays in mathematics

So I found some similarities between arrays and set notation while learning about sets and sequences in precalc eg set notation: {a | cond } = { a1, a2, a3, a4, ..., an} given that n is the domain (or index) of the array, a subset of Natural numbers (or unsigned integer). Most programming languages would provide similar methods to arrays that are applied to sets eg upperbounds & lowerbounds; possibly suprema and infima too.

Where did arrays come from?

Python's list comprehensions, in this respect, are as good as it gets:

[x for x in someset if x < 5]

Very "set-like". The for x in <...> part specifies which set the elements are selected from, and if x... specifies the condition.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM