這些方法包括:1. 陣列縮減方法:sum(求和)、product(求積)、and(與)、or(或)、xor(異或)2. 陣列定位方法: —min() —max() —unique() —find() //returns all the elements satisfying the givenexpression. —find_index() //returns the index of all the elements satisfying the given expression. —find_first() //returns the first element satisfying the givenexpression. —find_first_index() //returns the index of the first element satisfying thegiven expression. —find_last() //returns the last element satisfying the givenexpression. —find_last_index() //returns the index of the last element satisfying thegiven expression.3. 陣列排序方法:sort、rsort、reverse、shuffle。
SV提供了很多陣列方法,這些方法用於任何一種非合併的陣列型別,包括定寬陣列,動態陣列,佇列和關聯陣列。這些方法有繁有簡,種類繁多,包括求和,求積,排序等。
這些方法包括:1. 陣列縮減方法:sum(求和)、product(求積)、and(與)、or(或)、xor(異或)2. 陣列定位方法: —min() —max() —unique() —find() //returns all the elements satisfying the givenexpression. —find_index() //returns the index of all the elements satisfying the given expression. —find_first() //returns the first element satisfying the givenexpression. —find_first_index() //returns the index of the first element satisfying thegiven expression. —find_last() //returns the last element satisfying the givenexpression. —find_last_index() //returns the index of the last element satisfying thegiven expression.3. 陣列排序方法:sort、rsort、reverse、shuffle。