鄰接矩陣類(lèi)的根是A d j a c e n c y W D i g r a p h,因此從這個(gè)類(lèi)開(kāi)始。程序1 2 - 1給出了類(lèi)的描述。程
序中,先用程序1 - 1 3中函數(shù)Make2DArray 為二組數(shù)組a 分配空間,然后對(duì)數(shù)組a 初始化,以描述
一個(gè)n 頂點(diǎn)、沒(méi)有邊的圖的鄰接矩陣,其復(fù)雜性為( n2 )。該代碼沒(méi)有捕獲可能由M a k e 2 D A r r a y
引發(fā)的異常。在析構(gòu)函數(shù)中調(diào)用了程序1 - 1 4中的二維數(shù)組釋放函數(shù)D e l e t e 2 D
-- Booth Multiplier
-- This file contains all the entity-architectures for a complete
-- k-bit x k-bit Booth multiplier.
-- the design makes use of the new shift operators available in the VHDL-93 std
-- this design passes the Synplify synthesis check