Difference between revisions of "Serpentine.m"

From Spinach Documentation Wiki
Jump to: navigation, search
(Expand See also links to related Spinach functions and docs)
Line 1: Line 1:
 
{{DISPLAYTITLE:serpentine.m}} __NOTOC__
 
{{DISPLAYTITLE:serpentine.m}} __NOTOC__
−
Serpentine index matrix used in Spinach for single-index numbering of matrix elements.
+
Serpentine index matrix used in Spinach for single-index
  
 
==Syntax==
 
==Syntax==
Line 32: Line 32:
  
 
==See also==
 
==See also==
−
[[Main_Page]]
+
* [[kq2lin.m]]
 +
* [[lin2kq.m]]
 +
* [[sin_tran.m]]
 +
* [[st_product_table.m]]
 +
* [[bos_product_table.m]]
 +
* [[oper2ist.m]]
 +
 
 +
 
  
 
''Version 2.11, authors: [[Ilya Kuprov]]''
 
''Version 2.11, authors: [[Ilya Kuprov]]''

Revision as of 20:25, 22 February 2026

Serpentine index matrix used in Spinach for single-index

Syntax

                 S=serpentine(nlevels,idx_base)

Arguments

       nlevels  - dimension of the matrix, a
                  positive real integer
       idx_base - indexing base, 0 or 1

Outputs

       S        - serpentine matrix, for example (base 1):
                           (1 )(3 )(6 )(10)
                           (2 )(5 )(9 )(13)
                           (4 )(8 )(12)(15)
                           (7 )(11)(14)(16)
                  or (with indexing set to base 0):
                           (0 )(2 )(5 )(9 )
                           (1 )(4 )(8 )(12)
                           (3 )(7 )(11)(14)
                           (6 )(10)(13)(15)

Examples

See examples in the Spinach distribution relevant to this function.

Notes

This page was generated from the function header in the Spinach repository.

See also


Version 2.11, authors: Ilya Kuprov