灯下 登录
计算机科学 / SICP / 2.5.3 Example: Symbolic Algebra

Exercise 2.90 · 习题

Exercise 2.90: Suppose we want to have a

polynomial system that is efficient for both sparse and dense polynomials. One

way to do this is to allow both kinds of term-list representations in our

system. The situation is analogous to the complex-number example of

2.4, where we allowed both rectangular and polar representations. To do

this we must distinguish different types of term lists and make the operations

on term lists generic. Redesign the polynomial system to implement this

generalization. This is a major effort, not a local change.

练习 2.90:假设我们希望建立一个对稀疏多项式和稠密多项式都高效的多项式系统。一种方法是在系统中同时允许两种项表表示方式。这与 2.4 节的复数示例类似,那里我们同时允许了直角坐标和极坐标两种表示。为此,我们必须区分不同类型的项表,并使项表上的操作是通用的。请重新设计多项式系统以实现这一推广。这是一项重大工程,而非局部改动。