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
f8a6a2f5
Commit
f8a6a2f5
authored
6 years ago
by
Lawrence Chung
Browse files
Options
Downloads
Patches
Plain Diff
latlng from dist
parent
0788de7f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/search/BasicSearchResult.java
+16
-1
16 additions, 1 deletion
src/search/BasicSearchResult.java
src/search/Graph.java
+1
-7
1 addition, 7 deletions
src/search/Graph.java
with
17 additions
and
8 deletions
src/search/BasicSearchResult.java
+
16
−
1
View file @
f8a6a2f5
...
...
@@ -3,6 +3,7 @@ package search;
import
java.util.ArrayList
;
import
data.Record
;
import
java.lang.Math
;
public
class
BasicSearchResult
{
private
ArrayList
<
Record
>
results
;
...
...
@@ -10,13 +11,18 @@ public class BasicSearchResult {
private
BST
<
Integer
,
Integer
>
histogram
;
private
Integer
sum
;
public
static
void
main
(
String
[]
args
)
{
//Graph g = new Graph();
}
public
BasicSearchResult
(
ArrayList
<
Record
>
results
,
double
time
)
{
this
.
results
=
results
;
this
.
time
=
time
;
}
public
Iterable
<
Record
>
results
()
{
return
(
Iterable
<
Record
>)
results
;
return
(
Iterable
<
Record
>)
results
;
}
public
int
n
()
{
...
...
@@ -41,4 +47,13 @@ public class BasicSearchResult {
}
return
this
.
sum
;
}
private
double
lngRange
(
double
dist
,
double
lat
){
return
dist
/(
Math
.
cos
(
lat
)*
222
);
}
private
double
latRange
(
double
dist
){
return
(
dist
/
111
)/
2
;
}
}
This diff is collapsed.
Click to expand it.
src/search/Graph.java
+
1
−
7
View file @
f8a6a2f5
...
...
@@ -8,13 +8,7 @@ public class Graph {
public
static
void
main
(
String
[]
args
)
{
Graph
g
=
new
Graph
(
5
);
g
.
addEdge
(
4
,
3
);
g
.
addEdge
(
2
,
3
);
g
.
addEdge
(
1
,
2
);
g
.
addEdge
(
0
,
2
);
for
(
int
i
=
0
;
i
<
5
;
i
++)
System
.
out
.
println
(
g
.
adj
(
i
));
}
public
Graph
(
int
V
){
...
...
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