-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFibNode.java
More file actions
76 lines (65 loc) · 1009 Bytes
/
FibNode.java
File metadata and controls
76 lines (65 loc) · 1009 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
public class FibNode extends ListNode
{
private int key;
private FibNode parent;
private LinkedList currentLevel;
private LinkedList child;
private int degree;
private boolean mark;
public
FibNode(int key)
{
super(key);
this.parent = null;
this.currentLevel = new LinkedList();
currentLevel.addToFront(this);
this.child = null;
this.degree = 0;
this.mark = false;
}
public FibNode
getParent()
{
return this.parent;
}
public LinkedList
getCurrentLevel()
{
return this.currentLevel;
}
public LinkedList
getChild()
{
return this.child;
}
public int
getDegree()
{
return this.degree;
}
public boolean
getMark()
{
return this.mark;
}
public void
setParent(FibNode newParent)
{
this.parent = newParent;
}
public void
setSibling(FibNode newSibling)
{
this.currentLevel.addToFront(newSibling);
}
public void
setChild(LinkedList newChild)
{
this.child = newChild;
}
public void
setMark(boolean newMark)
{
this.mark = newMark;
}
}//end class