Last change
on this file since 8288 was 8288, checked in by kjdon, 20 years ago |
added in daniel's mods for new server stuff - not sure what they are :-)
|
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
841 bytes
|
Line | |
---|
1 | package vishnu.datablock;
|
---|
2 | import java.io.*;
|
---|
3 |
|
---|
4 | public class SparseNode implements Serializable
|
---|
5 | {
|
---|
6 | private float value;
|
---|
7 |
|
---|
8 | private int column;
|
---|
9 | private SparseNode next;
|
---|
10 |
|
---|
11 |
|
---|
12 | SparseNode(float f, int c)
|
---|
13 | {
|
---|
14 | value = f;
|
---|
15 | column = c;
|
---|
16 | next = null;
|
---|
17 | }
|
---|
18 |
|
---|
19 |
|
---|
20 | SparseNode(float f, int c, SparseNode n)
|
---|
21 | {
|
---|
22 | value = f;
|
---|
23 | column = c;
|
---|
24 | next = n;
|
---|
25 | }
|
---|
26 |
|
---|
27 |
|
---|
28 | public SparseNode push(SparseNode n)
|
---|
29 | {
|
---|
30 | if (next != null) next.push(n);
|
---|
31 | else next = n;
|
---|
32 | return this;
|
---|
33 | }
|
---|
34 |
|
---|
35 |
|
---|
36 | public SparseNode pop()
|
---|
37 | {
|
---|
38 | return next;
|
---|
39 | }
|
---|
40 |
|
---|
41 |
|
---|
42 | public SparseNode getNext()
|
---|
43 | {
|
---|
44 | return next;
|
---|
45 | }
|
---|
46 |
|
---|
47 |
|
---|
48 | public int getColumn()
|
---|
49 | {
|
---|
50 | return column;
|
---|
51 | }
|
---|
52 |
|
---|
53 |
|
---|
54 | public float getValue()
|
---|
55 | {
|
---|
56 | return value;
|
---|
57 | }
|
---|
58 | }
|
---|
59 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.