I think a vector is a n x 1 matrix.
I think "v=<1,2,3> ; v_at_1" should return 1, since we should be able to skip
any indicies that have to be one. Thus "v=<1> ; v" would also be 1.
I think that "'" is a very short symbol that allows all vector stuff to be
done easily as matricies.
I do think "<" and "[" should be synonmous.
A nice feature that is very math like is having "f(<1,2,3>,4)" be the same
as "f(1,2,3,4)".
Towards this end I suggest 3 new operators that sort of supercede other
operators.
"," is the horizontal concatenator.
":" is the vertical concatenator.
";" is the list seperator.
Thus "[1,2,3:4]" more clearly means "make a matrix. put 1 in it. add 2 to
the end of the first row. Add 3 to the end of the first row. Add a 4 to
the end of the first column. As a matter of style, we give ":" precedence
over "," so that "[1,2,3:4,5]" works as expected.
";" is very important as a seperator for function arguments that should
not be smushed.
"A=[1,2:3,4] ; B=[3,4:5,6] ; f(A;B)" sends the function f 2 2x2 matrixes.
"A=[1,2:3,4] ; B=[3,4:5,6] ; f(A,B)" sends the function f 1 2x4 matrix.
Why does the ";" work as a command seperator? Because everyline implicitly
calls a function that prints the value of the last element in a list
while evaluating each argument in the list in order.
I would love "named sets" or associative sets. A list is basically a set,
it has a very weak ordering to it, namely the order in which the elements
were written. Or at your option really, an arbitrary order imposed by an
undocumented and ever changing set-maker function.
Ok so the named set is alot like c struct's.
"L = { 4 := 7 ; 2 := 9 ; 3 := 1 } ; L_at_4" returns 7
This seems to me to be what you wanted with defining functions as sets fo
ordered pairs (some functions that is).
Maybe have an alternate list dereferncing notation "L(4)" returns 7 too.
Ok and one last thing: graphs:
Some people say a group is an ordered pair of a set and an operation on
that set. The set itself is redundant, since it is by definition of
operation the union of all first members of the operation (as viewd as a
set of ordered triples). Simply put the operation contains the base set.
Same with a topology, the union of all open sets is the base set, so
notating the base set is merely convenience, it contains no information.
Same with a graph. It's jsut the edges. Isolated points are normally
irrelevant in a graph, but could be noted as an ordered 1-tuple.
As for genius: who is gonna name the nodes? We don't have strings right?
Is anyone really really gonna care if he can't name a node 3.45? I say all
nodes are positive integers, preferably small ones. All a graph is then,
is a list of ordered pairs.
Perhaps beef up list dereferncing to return a list of all values
associated with a particular "key". Also have ordered n-tuples have
any "head" as a key. So that a function is a list of ordered pairs, but
could be more flexible.
"f={<1,1>;<2,2>;<4,4>} ; f(1)" returns 1.
"f={<1,1,1>;<2,2,2>;<4,4,4>} ; f(1,1)" returns 1.
"f={<1,1,1>;<2,2,2>;<4,4,4>} ; f(1)" returns <1,1>.
As for quoted matrices, would "<>" be fine for meaning that this
particular matrix shouldn't be expanded? And "[]" mean a (possibly) block
matrix (possibly component).
RLab seems to have some nice features. URL on request. It is GPL'd so code
and idea sharing should be no problem.
-Jack
Received on Tue May 18 1999 - 12:05:39 CDT
This archive was generated by hypermail 2.2.0 : Sun Apr 17 2011 - 21:00:02 CDT