您在這裡

Examples

26 七月, 2019 - 09:51
Available under Creative Commons-ShareAlike 4.0 International License. Download for free at http://cnx.org/contents/402b20ad-c01f-45f1-9743-05eadb1f710e@37.6

The following is an (abstract) implementation of IRACFactory using LRStruct as the underlining data structure. By varying the insertion strategy, which is an IAlgo on the internal LRStruct, we obtain different types of RAC: stack, queue, random, etc.

media/image1.png
Figure 5.1 UML diagram of the abstract RAC and RAC factory definitions plus a few concrete RAC factories. 

The source code for the following examples can be downloaded here: