Write the class “DoubleLinkedSparseMatrix”.
DoubleLinkedSparseMatrix 클래스를 만드세요.

The class has two kinds of chains: row chains and column chains.
이 클래스는 두종류의 체인을 갖고 있어요. 행과, 열.

Each row has a row chain that consists of elements at the same row.
각 열에는 같은 열에 있는 인자를 저장하는 열체인을 갖고있어요.

Similarly, each column has a column chain.
비슷하게, 각 행은 행체인을 갖고있어요.

Naturally, an element is linked in both a row chain and a column chain at the same time.
당연히 각 인자는 열체인과 행체인에 연결되어 있어요.
The class must provide following methods other than constructors.
이 클래스는 아래에 있는 것들을 갖고있어야 되요.

A) Int insert(int row, int col, Object element)
삽입.
B) Object remove(int row, int col)
제거
C) Void transpose()
행-열변환
D) Object get(int row, int col)

E) Iterator getRowIterator(int row)
열 Iterator.
F) Iterator getColumnIterator(in col)
행 Iterator.

You have to write both interator classes, “SparseMatrixRowIterator” and “SparseMatrixColumnIterator” based on your “DoubleLinkedSparseMatrix”.
그러니까 2개의 iterator클래스도 만들어야되죠.
SparseMatrixRowIteratorSparseMatrixColumnIterator

A row iterator iterates the elements in a row sequentially (from the one with the smallest column).
SparseMatrixRowIterator녀석은 행을 따라 움직여야 되고,
A column iterator iterates the elements in a column one by one.
SparseMatrixColumnIterator녀석은 열을 따라 움직여야 되요.

You must do your homework solely, not with any friends.
과제는 혼자하세요,, 친구랑 같이 하지 말고....

'생활 > 데이터 스트럭쳐' 카테고리의 다른 글

Data Structure 6번째 HW(번역)  (0) 2010.04.15
Data Structure 6번째 HW  (0) 2010.04.15
Data Structure 5번째 HW(내맘대로 분석)  (0) 2010.04.10
Data Structure 5번째 HW(번역)  (0) 2010.04.10
Data Structure 5번째 HW  (0) 2010.04.10