Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
2XB3FinalProject
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Contributor analytics
Repository analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Christopher Schankula
2XB3FinalProject
Commits
73a45277
Commit
73a45277
authored
7 years ago
by
Lawrence Chung
Browse files
Options
Downloads
Patches
Plain Diff
Node ADT edit
parent
b36432e1
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/search/Node.java
+25
-4
25 additions, 4 deletions
src/search/Node.java
with
25 additions
and
4 deletions
src/search/Node.java
+
25
−
4
View file @
73a45277
...
...
@@ -2,15 +2,15 @@ package search;
//import search.RedBlackTree.Node;
public
class
Node
<
Key
,
Value
>{
public
class
Node
<
Key
,
Value
,
T
>{
private
Key
key
;
private
Value
val
;
private
Comparable
<
T
>[]
val
;
private
Node
left
,
right
;
private
int
n
;
private
boolean
color
;
Node
(
Key
key
,
Value
val
,
int
n
,
boolean
color
){
public
Node
(
Key
key
,
Comparable
<
T
>[]
val
,
int
n
,
boolean
color
){
this
.
key
=
key
;
this
.
val
=
val
;
this
.
n
=
n
;
...
...
@@ -21,18 +21,35 @@ public class Node<Key, Value>{
return
this
.
key
;
}
public
Value
val
(){
public
void
key
(
Key
key
){
this
.
key
=
key
;
}
public
Comparable
<
T
>[]
val
(){
return
this
.
val
;
}
public
void
val
(
Value
val
){
this
.
val
=
val
;
}
public
Node
left
(){
return
this
.
left
;
}
public
void
left
(
Node
left
){
this
.
left
=
left
;
}
public
Node
right
(){
return
this
.
right
;
}
public
void
right
(
Node
right
){
this
.
right
=
right
;
}
public
int
N
(){
return
this
.
n
;
}
...
...
@@ -40,4 +57,8 @@ public class Node<Key, Value>{
public
boolean
color
(){
return
this
.
color
;
}
public
void
color
(
boolean
color
){
this
.
color
=
color
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment