Skip to content

CS131-TA-team/sigma_notation

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Macro Example 1: Sigma Notation

This example shows how to define a sigma notation macro, which calculates summations of products over the some indices that only occurs on the right hand side.

For example:

#Σ[(c i k) (a i j) (b j k)]

means assign c[j,k] with the sum of a[i,j]*b[j,k] over j, i.e. $$ c_{i,k} = \sum_{j} {a_{i,j}b_{j,k}} \forall j $$

#Σ[(s k) (x i) (y j) (w i j k)]

means assign s[k] with the sum of x[i]*y[j]*w[i,j,k] over (i,j).

Releases

No releases published

Packages

No packages published

Languages

  • Python 51.6%
  • Hy 48.4%