suminfo {lazy.symbolic}R Documentation

Information of Nested Summations

Description

Information of Nested Summations

Usage

suminfo(exp, sort = 0, print = 0, debug = 0)

Arguments

exp

expression to be analyzed

sort

= 1 to sort the result descendingly by level
= -1 to sort the result ascendingly

print

= 1 to print the result

debug

= 1 to print intermediate result

Details

This function analyses an expression containing summations.

Value

A list of range, parent, level, sub, srange, body.
where
range starting and ending location of each summation: s( body, sub,range)
parent parent summation number: parent of top = 0
level summation level number: level of top = 1
sub subscript of the summation
srange range of the summation: a matrix consisting of (from,to)
body body of the summation
oper preceding operator or paren etc
locspec starting location of the spec.

Examples

sexp="s( s( (s(a3,{i3})+s(a4,{i4}))*s( s(a6,{i6}), {i5}), {i2}), {i1,1,n1})"
suminfo( sexp, print=1 )



[Package lazy.symbolic version 0.1.4 ]