HOME

TheInfoList



OR:

Yorick is an interpreted
programming language A programming language is a system of notation for writing computer programs. Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
designed for numerics,
graph Graph may refer to: Mathematics *Graph (discrete mathematics), a structure made of vertices and edges **Graph theory, the study of such graphs and their properties *Graph (topology), a topological space resembling a graph in the sense of discret ...
plotting, and steering large scientific simulation codes. It is quite fast due to array syntax, and extensible via C or Fortran routines. It was created in 1996 by David H. Munro of
Lawrence Livermore National Laboratory Lawrence Livermore National Laboratory (LLNL) is a Federally funded research and development centers, federally funded research and development center in Livermore, California, United States. Originally established in 1952, the laboratory now i ...
.


Features


Indexing

Yorick is good at manipulating elements in N-dimensional arrays conveniently with its powerful syntax. Several elements can be accessed all at once: > x= ,2,3,4,5,6 > x ,2,3,4,5,6> x(3:6) ,4,5,6> x(3:6:2) ,5> x(6:3:-2) ,4 ;Arbitrary elements > x= 1,2,3 ,5,6 > x 1,2,3 ,5,6 > x( ,1 ,2 ,1 ,1 ,4">,1 ,4 > list=where(1 list [2,3,4,5,6">,4">,1 PDL and "broadcasting" in Numpy">,4 > list=where(1 list [2,3,4,5,6> y=x(list) > y [2,3,4,5,6 ;Pseudo-index Like "theading" in Perl Data Language">PDL and "broadcasting" in Numpy, Yorick has a mechanism to do this: > x= ,2,3> x ,2,3> y= 1,2,3 ,5,6 > y 1,2,3 ,5,6 > y(-,) [1[2">[1.html" ;"title="[1">[1[2[3">[1.html"_;"title="[1">[1<_a>[2.html" ;"title="[1.html" ;"title="[1">[1[2">[1.html" ;"title="[1">[1[2[3,4],[5],[6] > x(-,) 1],[2],[3 > x(,-) 1,2,3 > x(,-)/y 1,1,1],[0,0,0 > y=1.,2,3], ,5,6 > x(,-)/y 1,1,1],[0.25,0.4,0.5 ;Rubber index ".." is a rubber-index to represent zero or more dimensions of the array. > x= 1,2,3 ,5,6 > x 1,2,3 ,5,6 > x(..,1) ,2,3> x(1,..) ,4> x(2,..,2) 5 "*" is a kind of rubber-index to reshape a slice(sub-array) of array to a vector. > x(*) ,2,3,4,5,6 ;Tensor multiplication
Tensor In mathematics, a tensor is an algebraic object that describes a multilinear relationship between sets of algebraic objects associated with a vector space. Tensors may map between different objects such as vectors, scalars, and even other ...
multiplication is done as follows in Yorick: P(,+, )*Q(, +) means \sum_^ > x= 1,2,3 ,5,6 > x 1,2,3 ,5,6 > y= 7,8 ,10 1,12 > x(,+)*y(+,) 39,54,69 9,68,87 9,82,105 > x(+,)*y(,+) 58,139 4,154


External links


Linux Journal Review
{{DEFAULTSORT:Yorick (Programming Language) Array programming languages Free and open source interpreters Lawrence Livermore National Laboratory Programming languages created in 1996