Skip to content

Commit 7fca9b9

Browse files
committed
lots of non-functional (placeholder) additions, finally
1 parent d098c40 commit 7fca9b9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+535
-24
lines changed

Makefile

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
PACKAGES := comp_geometry graph network_flow path_finding searching sorting
3+
4+
all: clean install test
5+
.PHONY : all
6+
7+
install:
8+
$(foreach pkg,$(PACKAGES),$(MAKE) -C $(pkg) install ;)
9+
10+
build:
11+
$(foreach pkg,$(PACKAGES),$(MAKE) -C $(pkg) ;)
12+
13+
clean:
14+
$(foreach pkg,$(PACKAGES),$(MAKE) -C $(pkg) clean ;)
15+
16+
test:
17+
$(foreach pkg,$(PACKAGES),$(MAKE) -C $(pkg) test ;)

README

Lines changed: 57 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,70 @@
11
Description
22
------------
3+
Go language implementation of selected algorithms from the
4+
"Algorithms in a Nutshell" book. The source code attempts to follow,
5+
as closely as possible, the algorithm pseudocode from the book.
36

47

5-
Compiling
6-
---------
7-
make
8+
Building/Installing/Testing
9+
---------------------------
10+
11+
$ make [all|clean|install|test|build]
12+
13+
all : calls clean, install, and test
14+
build : compiles but doesn't install
815

9-
Testing
10-
-------
11-
make test
1216

1317
Usage
1418
-----
1519

1620

1721
Examples
1822
--------
23+
24+
Status Completed
25+
----------------------------------------------------------
26+
Sorting Algorithms: [X]
27+
Insertion Sort [X]
28+
Median Sort [X]
29+
Quick Sort [X]
30+
Selection Sort [X]
31+
Heap Sort [X]
32+
Counting Sort [X]
33+
Bucket Sort [X]
34+
35+
Searching: []
36+
Sequential Search [X]
37+
Binary Search [X]
38+
Hash-based Search []
39+
Binary Tree Search []
40+
41+
Graph Algorithms: []
42+
Depth-First Search []
43+
Breadth-First Search []
44+
Single-Source Shortest Path []
45+
All Pairs Shortest Path []
46+
Minimum Spanning Tree Algorithms []
47+
48+
Path Finding in AI: []
49+
Depth-First Search []
50+
Breadth-First Search []
51+
A*Search []
52+
Comparison []
53+
Minimax []
54+
NegMax []
55+
AlphaBeta []
56+
57+
Network Flow Algorithms: []
58+
Maximum Flow []
59+
Bipartite Matching []
60+
Minimum Cost Flow []
61+
Transshipment []
62+
Transportation []
63+
Linear Programming []
64+
65+
Computational Geometry: []
66+
Convex Hull Scan []
67+
LineSweep []
68+
Nearest Neighbor Queries []
69+
Range Queries []
1970

comp_geometry/Makefile

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright (c) 2010 Joseph D Poirier
2+
# Distributable under the terms of The New BSD License
3+
# that can be found in the LICENSE file.
4+
5+
include $(GOROOT)/src/Make.inc
6+
7+
TARG=algos/comp_geometry
8+
9+
GOFILES=\
10+
convex_hull_scan.go\
11+
linesweep.go\
12+
nearest_neighbor_queries.go\
13+
range_queries.go\
14+
15+
include $(GOROOT)/src/Make.pkg

comp_geometry/comp_geometry_test.go

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
Copyright (c) 2010 Joseph D Poirier
3+
Distributable under the terms of The New BSD License
4+
that can be found in the LICENSE file.
5+
*/
6+
package comp_geometry
7+
8+
import (
9+
// "fmt"
10+
"testing"
11+
)
12+
13+
14+
func TestConvexHullScan(t *testing.T) {
15+
}
16+
17+
func TestLineSweep(t *testing.T) {
18+
}
19+
20+
func TestNearestNeighborQueries(t *testing.T) {
21+
}
22+
23+
func TestRangeQueries(t *testing.T) {
24+
}

comp_geometry/convex_hull_scan.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/*
2+
Copyright (c) 2010 Joseph D Poirier
3+
Distributable under the terms of The New BSD License
4+
that can be found in the LICENSE file.
5+
*/
6+
package comp_geometry
7+
8+
9+
func ConvexHullScan(array []int, t int) bool {
10+
return true
11+
}

comp_geometry/linesweep.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/*
2+
Copyright (c) 2010 Joseph D Poirier
3+
Distributable under the terms of The New BSD License
4+
that can be found in the LICENSE file.
5+
*/
6+
package comp_geometry
7+
8+
9+
func LineSweep(array []int, t int) bool {
10+
return true
11+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/*
2+
Copyright (c) 2010 Joseph D Poirier
3+
Distributable under the terms of The New BSD License
4+
that can be found in the LICENSE file.
5+
*/
6+
package comp_geometry
7+
8+
9+
func NearestNeighborQueries(array []int, t int) bool {
10+
return true
11+
}

comp_geometry/range_queries.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/*
2+
Copyright (c) 2010 Joseph D Poirier
3+
Distributable under the terms of The New BSD License
4+
that can be found in the LICENSE file.
5+
*/
6+
package comp_geometry
7+
8+
9+
func RangeQueries(array []int, t int) bool {
10+
return true
11+
}

graph/Makefile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Copyright (c) 2010 Joseph D Poirier
2+
# Distributable under the terms of The New BSD License
3+
# that can be found in the LICENSE file.
4+
5+
include $(GOROOT)/src/Make.inc
6+
7+
TARG=algos/graph
8+
9+
GOFILES=\
10+
all_pairs_shortest_path.go\
11+
breadthfirst_search.go\
12+
depthfirst_search.go\
13+
minimum_spanning_tree.go\
14+
singlesource_shortest_path.go\
15+
16+
include $(GOROOT)/src/Make.pkg

graph/all_pairs_shortest_path.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/*
2+
Copyright (c) 2010 Joseph D Poirier
3+
Distributable under the terms of The New BSD License
4+
that can be found in the LICENSE file.
5+
*/
6+
package graph
7+
8+
9+
func AllPairsShortestPath(array []int, t int) bool {
10+
return true
11+
}

0 commit comments

Comments
 (0)