Creating/Removing Variable Dependency
Date: 2020-10-07 18:10:00

Up | Prev | PrevTail | Tail

### 7.23 Creating/Removing Variable Dependency

There are several facilities in REDUCE, such as the diﬀerentiation operator and the linear operator facility, that can utilize knowledge of the dependency between various variables, or kernels. Such dependency may be expressed by the command DEPEND. This takes an arbitrary number of arguments and sets up a dependency of the ﬁrst argument on the remaining arguments. For example,

depend x,y,z;

says that X is dependent on both Y and Z.

depend z,cos(x),y;

says that Z is dependent on COS(X) and Y.

Dependencies introduced by DEPEND can be removed by NODEPEND. The arguments of this are the same as for DEPEND. For example, given the above dependencies,

nodepend z,cos(x);

says that Z is no longer dependent on COS(X), although it remains dependent on Y.

As a convenience, one or more dependent variables can be speciﬁed together in a list for both the DEPEND and NODEPEND commands, i.e.

(no)depend {y1, y2, …}, x1, x2, …

is equivalent to

(no)depend y1, x1, x2, …; (no)depend y2, x1, x2, …; …

Both commands also accept a sequence of “dependence sequences”, where the beginning of each new dependence sequence is indicated by a list of one or more dependent variables. For example,

depend {x,y,z},u,v,{theta},time;

is equivalent to

depend x,u,v;
depend y,u,v;
depend z,u,v;
depend theta,time;

Up | Prev | PrevTail | Front