Bohr magneton: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
en>Cydebot
m Robot - Moving category Fundamental physics concepts to Category:Concepts in physics per CFD at Wikipedia:Categories for discussion/Log/2012 July 12.
 
en>Hmains
m copyedit, MOS value rules and AWB general fixes using AWB
Line 1: Line 1:
The person who wrote this article is known as Karly and she totally digs that title. Finished she likes many is to do interior planning and now she's time for you to accept new thingsHer husband and her live-in Missouri but she'll need certainly to shift one day or another. Distributing output is her career.<br><br>my page ... [https://twitter.com/zeitpop Jordan Kurland]
{{multiple issues|
{{notability|date=July 2011}}
{{Unreferenced|date=October 2009}}
}}
 
{{Infobox programming language
| name                  = Yorick
| logo                  =
| caption                =
| file_ext              = .i
| paradigm              =
| year                  = 1996
| designer              = [[David H. Munro]]
| developer              =
| latest_release_version = 2.1.06
| latest_release_date    = June 2010
| latest_test_version    =
| latest_test_date      =
| typing                =
| implementations        =
| dialects              =
| influenced_by          =
| influenced            =
| operating_system      = [[Unix]], [[Linux]], [[Mac OS|Mac]], [[Microsoft Windows]]
| license                = [[BSD licenses|BSD]]
| website                = [http://yorick.sourceforge.net Yorick Home Page]
}}
 
'''Yorick''' is an [[Interpreted language|interpreted]] [[programming language]] designed for [[numerics]], [[graph of a function|graph]] plotting and steering large scientific simulation codes. It is quite fast due to [[Array data structure|array]] syntax, and extensible via [[C (programming language)|C]] or [[Fortran]] routines. It was created in 1996 by [[David H. Munro]] of [[Lawrence Livermore National Laboratory]].
 
== Features ==
* Indexing
Yorick is good at manipulating elements in N-dimensional arrays conveniently with its powerful syntax.
 
;Range of indices
 
Several elements can be accessed all at once:
 
<source lang="python">
> x=[1,2,3,4,5,6];
> x
[1,2,3,4,5,6]
> x(3:6)
[3,4,5,6]
> x(3:6:2)
[3,5]
> x(6:3:-2)
[6,4]
</source>
 
;Arbitrary elements
 
<source lang="python">
> x=[[1,2,3],[4,5,6]]
> x
[[1,2,3],[4,5,6]]
> x([2,1],[1,2])
[[2,1],[5,4]]
> list=where(1<x)
> list
[2,3,4,5,6]
> y=x(list)
> y
[2,3,4,5,6]
</source>
 
;Pseudo-index
 
Like "theading" in [[Perl Data Language|PDL]] (Perl Data Language) and "broadcasting" in [[Numpy]] (Numeric extension for Python), Yorick has a mechanism to do this:
 
<source lang="python">
> x=[1,2,3]
> x
[1,2,3]
> y=[[1,2,3],[4,5,6]]
> y
[[1,2,3],[4,5,6]]
> y(-,)
[[[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],[4,5,6]]
> x(,-)/y
[[1,1,1],[0.25,0.4,0.5]]
</source>
 
;Rubber index
 
".." is a rubber-index to represent zero or more dimensions of the array.
 
<source lang="python">
> x=[[1,2,3],[4,5,6]]
> x
[[1,2,3],[4,5,6]]
> x(..,1)
[1,2,3]
> x(1,..)
[1,4]
> x(2,..,2)
5
</source>
 
"*" is a kind of rubber-index to reshape a slice(sub-array) of array to a vector.
 
<source lang="python">
> x(*)
[1,2,3,4,5,6]
</source>
 
;Tensor multiplication
 
[[Tensor]] multiplication is done as follows in Yorick:
 
P(,+,,)*Q(,,+)
 
means <math>\sum_{j=1}^{j=N}{P_{ijkl}Q_{mnj}}</math>
 
<source lang="python">
> x=[[1,2,3],[4,5,6]]
> x
[[1,2,3],[4,5,6]]
> y=[[7,8],[9,10],[11,12]]
> x(,+)*y(+,)
[[39,54,69],[49,68,87],[59,82,105]]
> x(+,)*y(,+)
[[58,139],[64,154]]
</source>
 
==External links==
*[http://yorick.sourceforge.net Yorick Homepage]
*[http://www.linuxjournal.com/article/2184 Linux Journal Review]
*[http://yorick.sourceforge.net/refcard/refs.pdf Yorick Language Quick Reference Guide]
*[http://yorick.sourceforge.net/manual/yorick.php  Yorick manual]
 
{{DEFAULTSORT:Yorick (Programming Language)}}
[[Category:Lawrence Livermore National Laboratory]]
[[Category:Programming languages created in 1996]]
[[Category:Array programming languages]]
[[Category:Free compilers and interpreters]]
 
 
{{compu-lang-stub}}

Revision as of 04:29, 3 February 2014

Template:Multiple issues

Template:Infobox programming language

Yorick is an interpreted programming language designed for numerics, graph 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.

Features

  • Indexing

Yorick is good at manipulating elements in N-dimensional arrays conveniently with its powerful syntax.

Range of indices

Several elements can be accessed all at once:

> x=[1,2,3,4,5,6];
> x
[1,2,3,4,5,6]
> x(3:6)
[3,4,5,6]
> x(3:6:2)
[3,5]
> x(6:3:-2)
[6,4]
Arbitrary elements
> x=[[1,2,3],[4,5,6]]
> x
[[1,2,3],[4,5,6]]
> x([2,1],[1,2])
[[2,1],[5,4]]
> list=where(1<x)
> list
[2,3,4,5,6]
> y=x(list)
> y
[2,3,4,5,6]
Pseudo-index

Like "theading" in PDL (Perl Data Language) and "broadcasting" in Numpy (Numeric extension for Python), Yorick has a mechanism to do this:

> x=[1,2,3]
> x
[1,2,3]
> y=[[1,2,3],[4,5,6]]
> y
[[1,2,3],[4,5,6]]
> y(-,)
[[[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],[4,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],[4,5,6]]
> x
[[1,2,3],[4,5,6]]
> x(..,1)
[1,2,3]
> x(1,..)
[1,4]
> x(2,..,2)
5

"*" is a kind of rubber-index to reshape a slice(sub-array) of array to a vector.

> x(*)
[1,2,3,4,5,6]
Tensor multiplication

Tensor multiplication is done as follows in Yorick:

P(,+,,)*Q(,,+)

means j=1j=NPijklQmnj

> x=[[1,2,3],[4,5,6]]
> x
[[1,2,3],[4,5,6]]
> y=[[7,8],[9,10],[11,12]]
> x(,+)*y(+,)
[[39,54,69],[49,68,87],[59,82,105]]
> x(+,)*y(,+)
[[58,139],[64,154]]

External links


Hello!
My name is Marguerite and I'm a 29 years old boy from New Haven.

My web-site; http://www.hostgator1centcoupon.info