Update project structure

This commit is contained in:
Rory Healy 2024-06-12 00:08:20 +10:00
parent 5e480bf4aa
commit cd3c219180
Signed by: roryhealy
GPG key ID: 0A3CBDE9C2AE672F
52 changed files with 2566 additions and 1820 deletions

3
.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
*.o
build/
voronoi1

29
.vscode/launch.json vendored
View file

@ -1,29 +0,0 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "gcc-10 - Build and debug active file",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}/${fileBasenameNoExtension}",
"args": ["dataset_1.csv", "poly_1split.txt", "output.txt"],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": false,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
"preLaunchTask": "C/C++: gcc-10 build active file",
"miDebuggerPath": "/usr/bin/gdb"
}
]
}

View file

@ -1,9 +0,0 @@
{
"files.associations": {
"voronoi.h": "c",
"stdio.h": "c",
"dcel.h": "c",
"common.h": "c",
"string.h": "c"
}
}

27
.vscode/tasks.json vendored
View file

@ -1,27 +0,0 @@
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: gcc-10 build active file",
"command": "/usr/bin/gcc-10",
"args": [
"-g",
"${file}",
"-o",
"${fileDirname}/${fileBasenameNoExtension}"
],
"options": {
"cwd": "${fileDirname}"
},
"problemMatcher": [
"$gcc"
],
"group": {
"kind": "build",
"isDefault": true
},
"detail": "Task generated by Debugger."
}
],
"version": "2.0.0"
}

30
Makefile Executable file → Normal file
View file

@ -1,16 +1,14 @@
# Link command: BUILDDIR=$(CURDIR)/build
voronoi1: common.o dcel.o voronoi.o main.o
gcc -Wall -Wextra -Werror -pedantic -g -o voronoi1 main.o voronoi.o dcel.o common.o voronoi1: build/common.o build/dcel.o build/voronoi.o build/main.o | $(BUILDDIR)
gcc -Wall -Wextra -Werror -pedantic -g -o voronoi1 $^
# Compilation commands:
common.o: common.c build/%.o: src/%.c
gcc -Wall -Wextra -Werror -pedantic -g -o common.o common.c -c gcc -Wall -Wextra -Werror -pedantic -g -c $< -o $@
dcel.o: dcel.c $(BUILDDIR):
gcc -Wall -Wextra -Werror -pedantic -g -o dcel.o dcel.c -c mkdir -p $(BUILDDIR)
voronoi.o: voronoi.c clean:
gcc -Wall -Wextra -Werror -pedantic -g -o voronoi.o voronoi.c -c @rm -rf build
@rm -f voronoi1
main.o: main.c
gcc -Wall -Wextra -Werror -pedantic -g -o main.o main.c -c

4
README.md Executable file → Normal file
View file

@ -1,2 +1,2 @@
# COMP20003 Assignment 1 - Doubly Connected Edge Lists (DCELs) # COMP20003 Assignment 1 - Doubly Connected Edge Lists (DCELs)

BIN
common.o

Binary file not shown.

BIN
dcel.o

Binary file not shown.

512
docs/SPECIFICATION.md Normal file
View file

@ -0,0 +1,512 @@
# Assignment Specification
Below is the assignment specification, in full, slightly edited for context and appearence.
## Purpose
The purpose of this assignment is for you to:
- Improve your proficiency in C programming and your dexterity with dynamic memory allocation.
- Demonstrate understanding of a concrete data structure (doubly connected edge list).
- Practice multi-file programming and improve your proficiency in using UNIX utilities.
## Problem Context
The context of the assignment task is that a set of watchtowers have been provided for the citizens of Victoria to protect against bushfires, funding has been allocated based on a number of regions and the government wants to better understand the total population the watchtowers in each region are watching over.
## Background
Geometric data can be stored in many ways, such as a list of points, the union of basic shapes such as circles, rectangles and triangles or the solution of a set of inequalities. The choice of data structure can greatly affect which operations are easy to perform on that geometry.
Some geometric problems require us to not only store the geometric properties such as the coordinates of points (or vertices), but also if two points are connected or if two edges bound the same region in a polygonal mesh. Such information is called topological information.
There are a number of data structures that can store geometric and topological information efficiently. In this assignment, we will discuss one of those: the doubly connected edge list (DCEL). The DCEL is a data structure that enables us to store and reconstruct any planar subdivision. Now, what is a planar subdivision? Here is a graphical example but we give a more formal introduction in the [Graphs](#markdown-header-graphs) section.
![](./images/image01.png)
As the diagram shows we have vertices coloured in blue and edges coloured in black. If you pick a single vertex of the red polygon and traverse the edges incident to it on clockwise order, then you will return to the starting vertex. Such a planar subdivision has in general three entities: vertices, edges and faces (the polygon regions).
We could store each polygon in a singly connected list of vertices but that would be quite inconvenient if we wanted to answer the following queries efficiently:
- Which edges share the same given vertex?
- Which two faces share a particular edge?
- Which faces are adjacent to a given face (for example, which polygons are adjacent to the red polygon)?
- Which edges border a given face?
In addition to queries, our data structure also needs to support various operations such as splitting the red face (polygon) if a new edge is introduced that connects two vertices of the face that are not adjacent, or splitting a half-edge into two at the mid-point of a given edge.
### Graphs
A graph is a $G$ is a pair $G=\{V,E\}$ where $V$ is a set of *nodes* or *vertices* and $E$ is a set of edges (a binary relation on $V$).
If a pair of vertices $(u,v)∈E$ is the same as the pair $(v,u)$, they are connected by an *undirected* edge $(u,v)$. The vertices are called *adjacent* to each other.
A graph is called *undirected* if all of its edges are undirected.
A graph is called *planar* if:
- it is an undirected graph; and
- it can be drawn on a plane such that none of its edges are crossing.
A planar graph is a planar subdivision (see the figure above).
In this figure the vertices $a$ and $b$ are adjacent, and the edges $(c,d)$, $(d,i)$ and $(i,c)$ describe the triangle (face) $F3$.
![](./images/image02.png)
### DCEL
If we were store the $x$ and $y$-coordinates of the vertices $a$ to $i$ in an array or a linked list, then we would lose all topological information, for example, that the points $c$, $d$ and $i$ form a triangle and all belong to the same face $F3$. And vice versa, we might be interested in listing all vertices in clock (or counter clock)-wise order of face $F5$. To capture this information and to answer these queries (efficiently), we need a DCEL.
A DCEL is a data structure that represents (stores) the vertices, edges, and faces of our planar graph (subdivision). The reason we do not simply use a doubly linked list, for example, to store a subdivision is that for a given edge $e$, there are two possible next edges because each edge is incident to two faces. For example, the edge $(d, g)$ is incident to $F4$ and $F5$. In other words: there are two possible next edges. The key idea is to split each edge into two half edges, one where we traverse a face in a clockwise direction and one where we traverse the other face in a counter clockwise direction. Once we agree on an orientation (clockwise or counter clockwise), each face is bounded by unique half edges (i.e. each half edge is incident to exactly one face). The half edges that are incident with the same undirected edge are sometimes called *twins*. The figure below shows the twins $h_{45}$ and $h_{54}$ for the undirected edge $(d, g)$. If we agree on clockwise orientation then the half edge $h_{45}$ belongs exclusively to face $F4$ and $h_{54}$ to $F5$.
![](./images/image03.png)
For all details of the DCEL, see [Implementation Details](#markdown-header-implementation-details).
## Your Task
In this assignment, you will create a fundamental data structure which supports the sorting of points of interest into partitions of a geometric space. These data points come from properties of Victorian postcodes and a simple initial polygon. A user will be able to provide modifications to this polygon and receive information about what points land in each location.
Your implementation will receive three filenames as arguments and will build this data structure by reading from the first two files. The first file will contain a list of comma-separated values representing the location of a set of watch-towers and associated data for each of these watch towers (such as the population served) which you will read into a dynamically allocated array of pointers to a simple data structure containing this information.
The second file will contain a list of points, one per line, of the initial polygon, each of the coordinates separated by space. You may assume this polygon is always convex.
### Example
If the original polygon was the list of points $\{(0, 0), (0, 2), (2, 2), (2, 0)\}$, this would generate 4 edges:
$$
\{(0, 0) \rightarrow (0, 2), (0, 2) \rightarrow (2, 2), (2, 2) \rightarrow (2, 0), (2, 0) \rightarrow (0, 0)\}
$$
![](./images/image04.png)
On standard input, you will receive a list of pairs of integers. Each pair represents a split which should occur in the polygon. This split should bisect the two edges, beginning in the middle of the first edge and finishing at the middle of the second edge.
For the polygon above, the input $\{(2, 3)\}$ would generate two additional points. The first point bisects Edge 2 at position $(2, 1)$ and the second point bisects Edge 3 at position $(0, 1)$. Those two new points are connected with an additional edge. This new edge is also numbered sequentially as Edge 4. The starting and ending edge are now split and 2 new edges are added (Edge 5 and Edge 6). Further details on the numbering of these splits are given in the [Implementation Details](#markdown-header-implementation-details) section, but the result of this is shown here:
![](./images/image05.png)
This generates two areas, shown here as Face 0 and Face 1:
![](./images/image06.png)
The third file will be used to output the result of applying all splits. After all the splits have been processed, you'll output the information, first with the face, followed by each point of interest which lies inside that face. Finally you'll output the total population in each face.
## Datasets
The watchtower data filename will be the first argument to your program. A sample dataset can be seen in the [data](../data) directory.
The postcode data initially comes from the Department of Environment, Land, Water and Planning (ANZVI0803003025), and has been combined with population data from the [2016 Census](https://www.abs.gov.au/census/find-census-data/datapacks?release=2016) and names generated using the Python [names](https://pypi.org/project/names/) package, which uses 1990 US Census data.
The synthetic dataset has the following fields:
- **Watchtower ID** - the ID of the watchtower (string)
- **Postcode** - the postcode the watchtower is in (string)
- **Population Served** - the population served by the watchtower in 2016 (integer)
- **Watchtower Point of Contact Name** - the name of the manager of the watchtower (string)
- **x** - the longitude of the watchtower location (double)
- **y** - the latitude of the watchtower location (double)
The fields **Watchtower ID**, **Postcode**, and **Watchtower Point of Contact Name** are alphabetic strings of varying length. You may assume none of these fields are more than 128 characters. **Population Served** is an integer with no characters separating thousands. **x** and **y** can be considered double precision numbers.
This data is in csv format, with each field separated by a comma. For the purposes of the assignment, you may assume commas never occur inside any of the fields, the input data are well-formatted, the input files are not empty, the input file includes a header, the fields always occur in the order given above and that the maximum length of an input record (a single full line of the csv) is 512 characters. This could help you choose a reading buffer size.
You should store this data in a dynamic array of pointers which can be accessed by the index of the array.
Samples of various sizes are also provided.
`full_dataset.csv` - 1090 watchtower points
![](./images/image10.png)
`dataset_100.csv` - 100 watchtower points
![](./images/image11.png)
`dataset_10.csv` - 10 watchtower points
![](./images/image12.png)
`dataset_2.csv` - 2 watchtower points
![](./images/image13.png)
`dataset_1.csv` - 1 watchtower point
![](./images/image14.png)
### Initial polygon
The initial polygon filename will be the second argument to your program. Two sample polygons have been provided [here](../test/data/polygons).
One is a square polygon and the other is an irregular polygon. The polygon data has the following fields:
- **x** - The longitude of the location of the polygon point (double)
- **y** - The latitude of the location of the polygon point (double)
The fields **x** and **y** are decimals which should be interpreted with double precision. The data has no header line. The point in each line should be interpreted as being connected to the point in its following line, with the final line being connected to the first line.
The two values are split by a space.
### Sample splits
Splits should be read into your program from standard input. Two sample sets of splits for the square polygon and five sample sets of splits for the irregular polygon have been provided [here](../test/data/splits). The split data has the following fields:
- startEdge - The beginning edge of the split (integer)
- endEdge - The final edge of the split (integer)
The fields **startEdge** and **endEdge** are integers and correspond to the edges explained in the [Implementation Details](#markdown-header-implementation-details) section.
The two values are split by a space and pairs are given one per line.
## Implementation Details
Your `Makefile` should produce an executable program called `voronoi1`. This program should take three command line arguments:
1. The name of the csv data file used to construct the point data.
2. The second file will contain the initial polygon, specifying the x, y vertices in order, separated by spaces.
3. The name of an output file.
Your `voronoi1` program should:
- Read the data from the data file specified in the command line argument. The data from the csv should be stored in a dynamic array of pointers to structs. Datatypes for each field should be consistent with those in the [Datasets](#markdown-header-datasets) section.
- Construct the initial polygon from the second file. The points from this file should be used to construct a single Doubly Connected Edge List representing the inside of this polygon, with the first edge in this Doubly Connected Edge List stored in a dynamic array.
- Split the polygon into additional faces based on a listing of pairs of edges, creating a new edge between the middle of the first edge in the pair and the middle of the second edge in the pair. This numbering should be consistent with the numbering explained in the [Numbering](#markdown-header-numbering) section. The split will create exactly one new face.
- Output a summary of the watchtowers which lie in each face, consistent with the format explained under the [Format](#markdown-header-format) section.
##### Doubly Connected Edge List
In a doubly connected edge list, each edge is represented by two "half-edges". For the purposes of this assignment each half-edge should have:
- The index of the vertex at the end of the half-edge.
- The index of the vertex at the start of the half-edge.
- A pointer to the next half-edge in the face.
- A pointer to the previous half-edge in the face.
- A pointer to the other half-edge (this other edge runs in the opposite direction).
- The index of its corresponding face.
- The index of the edge it forms a part of.
Each vertex should have:
- An x-position.
- A y-position.
Each edge should have:
- A pointer to either (non-NULL) half-edge in the edge.
Each face should have:
- A pointer to any half-edge in the face.
This choice of organisation is not always strict (e.g. a vertex might be stored inside each half-edge itself if you like), but is recommended as it will likely help you when debugging your program. In addition it is recommended that you use dynamic arrays to store your vertices, edges and faces, this will make freeing all your data a simple for loop.
### Numbering
We now revisit our earlier example of splitting a simple square face constructed with the points $\{(0, 0), (0, 2), (2, 2), (2, 0)\}$ which created four edges:
$$
\{(0, 0) \rightarrow (0, 2), (0, 2) \rightarrow (2, 2), (2, 2) \rightarrow (2, 0), (2, 0) \rightarrow (0, 0)\}
$$
![](./images/image04.png)
In the split, we add a split from the middle of Edge 2 to the middle of Edge 3. This operation is a little more complex than it first appears:
![](./images/image05.png)
The construction of $(2, 1) \rightarrow (1, 0)$ (Edge 4) here is quite straight-forward, but as part of this operation we construct up to six half-edges and two vertices in total:
- $(2, 1)$ - Vertex E
- $(1, 0)$ - Vertex F
- $(2, 1) \rightarrow (1, 0)$ - Edge 4
- $(1, 0) \rightarrow (2, 1)$ - The twin of Edge 4
- The edge from Edge 2's new *end* vertex to its old *end* vertex (Edge 5)
- If the half-edge for Edge 2 existed, we would also construct it
- The edge from Edge 3's old *start* vertex to its new *start* vertex (Edge 6)
- If the half-edge for Edge 3 existed, we would also construct it
You may assume in this task that splits never need to cross one another (e.g. a line reading `5 0` would not be possible). This means every split creates exactly one additional face. Every half-edge in the new face must be updated to reflect its new face.
### Non-adjacent splits
One additional complexity exists in performing a split. This is where the two edges are not adjacent. Consider this example given as six points:
$$
\{(0, 0), (0, 2), (2, 2), (2, 0.5), (2, 0), (1.5, 0)\}
$$
![](./images/image15.png)
If we now introduce a split from Edge 2 to Edge 5, edges are added in a similar way:
![](./images/image16.png)
Note however that because Edge 2 and Edge 5 are not *adjacent originally* (the next edge of Edge 2 was not Edge 5 *nor* was Edge 5 the previous edge of Edge 2), this means there is at least one edge between them. In this case:
1. The new half-edge of Edge 7 must be connected with the half-edge following Edge 2 (next), which is in Edge 3 in this case.
2. The old half-edge following Edge 2 (in Edge 3) must be connected to the new half-edge of Edge 7 (prev).
3. The old half-edge preceding Edge 5 (in Edge 4) must be connected to the new half-edge of Edge 8 (next).
4. The new half-edge of Edge 8 must be connected with the edge preceding Edge 5 (prev), which is in Edge 4 in this case.
For the destination of the split, only the immediately previous half-edge matters, and for the source of the split, only the immediately following half-edge matters. Note also that though this example is given had a distinct Edge 3 and Edge 4, if only one edge originally separated Edge 2 and Edge 5, both new half-edges would connect to the same half-edge without any further issues.
### Format
Your program should output, in increasing order, the faces. First, print the face number (beginning from 0), then details of each watchtower in the face, with each field printed out along with its column headers, each field's value separated from its field name with a colon and space and each field separated by a comma, with one watchtower per line for each watchtower. Finally, after all faces and their watchtowers have been printed, output, for each face, the total population served by all the watchtowers contained in it. Assume where multiple watchtowers serve the same postcode that these populations are independent and can simply be summed.
### Example usage
For testing, it may be convenient to create a file of keys to be searched, one per line, and redirect the input from this file. Use the UNIX operator < to redirect input from a file.
Examples of use:
```bash
>>> make voronoi1
# Usage: ./voronoi1 datafile polygonfile outputfile < splitsfile
>>> ./voronoi1 s2ds.csv victoria_square.txt output.txt < single_split.txt
>>> cat output.txt
0
Watchtower ID: WT3953SGAEI, Postcode: 3953, Population Served: 1571, Watchtower Point of Contact Name: Ofelia Kadlec, x: 145.7780017, y: -38.55984015
1
Watchtower ID: WT3030WFXSP, Postcode: 3030, Population Served: 16718, Watchtower Point of Contact Name: Adam Guess, x: 144.6583806, y: -37.92039346
Watchtower ID: WT3030EAAIV, Postcode: 3030, Population Served: 16718, Watchtower Point of Contact Name: Kristi Blair, x: 144.6243407, y: -37.91670989
Face 0 population served: 1571
Face 1 population served: 33436
```
There may be variations in the numerical precision in the output and dataset characteristics may not be reflected in any of the provided datasets.
## Requirements
The following implementation requirements must be adhered to:
- You must write your implementation in the C programming language.
- You must write your code in a modular way, so that your implementation could be used in another program without extensive rewriting or copying. This means that the Doubly Connected Edge List operations are kept together in a separate .c file, with its own header (.h) file, separate from the main program.
- Your code should be easily extensible to different doubly connected edge lists. This means that the functions for modifying parts of your doubly connected edge list should take as arguments not only the values required to perform the operation required, but also a pointer to a particular doubly connected edge list (e.g. `newSplit(dcel, sourceEdge, destinationEdge)`).
- Your implementation must read the input file once only.
- Your program should store strings in a space-efficient manner. If you are using `malloc` to create the space for a string, remember to allow space for the final end of string `\0` (NULL).
- A full `Makefile` is not provided for you. The `Makefile` should direct the compilation of your program. To use the `Makefile`, make sure it is in the same directory as your code, and type `make voronoi1` to make the dictionary. You must submit your makefile with your assignment.
Hint: If you havent used make before, try it on simple programs first. If it doesnt work, read the error messages carefully. A common problem in compiling multifile executables is in the included header files. Note also that the whitespace before the command is a tab, and not multiple spaces. It is not a good idea to code your program as a single file and then try to break it down into multiple files. Start by using multiple files, with minimal content, and make sure they are communicating with each other before starting more serious coding.
## Programming Style
[This](./programming-style.c) is a style guide which assignments are evaluated against. For this subject, the 80 character limit is a guideline rather than a rule - if your code exceeds this limit, you should consider whether your code would be more readable if you instead rearranged it.
Some automatic evaluations of your code style may be performed where they are reliable. As determining whether these style-related issues are occurring sometimes involves non-trivial (and sometimes even undecidable) calculations, a simpler and more error-prone (but highly successful) solution is used. You may need to add a comment to identify these cases, so check any failing test outputs for instructions on how to resolve incorrectly flagged issues.
## Additional Support
Your tutors will be available to help with your assignment during the scheduled workshop times. Questions related to the assignment may be posted on the Ed discussion forum, using the folder tag Assignments for new posts. You should feel free to answer other students questions if you are confident of your skills.
A tutor will check the discussion forum regularly, and answer some questions, but be aware that for some questions you will just need to use your judgment and document your thinking. For example, a question like, “How much data should I use for the experiments?”, will not be answered; you must try out different data and see what makes sense.
If you have questions about your code specifically which you feel would reveal too much of the assignment, feel free to post a private question on the discussion forum.
## Submission
Your C code files (including your Makefile and any other files needed to run your code) should be submitted through Ed to this assignment. Your programs must compile and run correctly on Ed. You may have developed your program in another environment, but it still must run on Ed at submission time. For this reason, and because there are often small, but significant, differences between compilers, it is suggested that if you are working in a different environment, you upload and test your code on Ed at reasonably frequent intervals.
A common reason for programs not to compile is that a file has been inadvertently omitted from the submission. Please check your submission, and resubmit all files if necessary.
## Assessment
There are a total of 10 marks given for this assignment.
Your C program will be marked on the basis of accuracy, readability, and good C programming structure, safety and style, including documentation (2 marks). Safety refers to checking whether opening a file returns something, whether mallocs do their job, etc. The documentation should explain all major design decisions, and should be formatted so that it does not interfere with reading the code. As much as possible, try to make your code self-documenting, by choosing descriptive variable names. The remainder of the marks will be based on the correct functioning of your submission.
Note that these correct functioning-related marks will be based on passing various tests. If your program passes these tests without addressing the learning outcomes (e.g. if you fully hard-code solutions or otherwise deliberately exploit the test cases), you may receive less marks than is suggested but your marks will otherwise be determined by test cases.
| Marks | Task |
| ----- | ------------------------------------------------------------------------------------------------- |
| 3 | Able to read and output dataset (no splits) with no memory errors and all memory freed. |
| 2 | Splits on square polygon work correctly with no memory errors and all memory freed. |
| 3 | Splits on irregular polygon work correctly with no memory errors and all memory freed. |
| 2 | Program style consistent with Programming Style slide. Memory allocations and file opens checked. |
Note that code style will be manually marked in order to provide you with the most meaningful feedback for the second assignment.
## Hints
Here are a number of suggestions on how to approach the task in parts:
1. Begin with reading in the small file and storing it into an array of structs, this is generally non-trivial!
2. Get your program working cleanly on the smallest dataset in the first part before moving on.
3. After your program works on the smallest dataset, move up through the datasets until you correctly store all the datasets.
4. Once data is being correctly read, build the initial polygon and check your program is producing the correct output for this simple test, fully in the correct format.
5. After your program is fully working, read in the splits and start tackling the DCEL functionality.
A few general tips which are likely to apply when constructing the polygon and other geometry:
- Where possible, if pointers change meaning in the course of an operation, introduce additional variables to hold each value so you don't need to think about what variables in motion refer to.
For instance, consider the following:
```c
void swapVals1(int *a, int *b){
int temp = *a;
*a = *b;
*b = temp;
}
void swapVals2(int *a, int *b){
int oldA = *a;
int oldB = *b;
*a = oldB;
*b = oldA;
}
```
`swapVals2` is not vulnerable to the error:
```c
void swapVals(int *a, int *b){
*a = *b; // *a = oldB;
*b = *a; // *b = oldB; (!!)
}
```
The introduction of temporary variables which represent our conceptual understanding avoids mental load. The transformation from the second to the first is a trivial operation for the compiler to perform, so feel free to treat this as a free lunch and use as many temporary variables as you like!
- In a similar vein, split your program into distinct sections where possible - or, to put it another way, prepare as much as you can before you "begin". e.g. If, part-way through your calculation, you might need to reallocate something to get space for it, it is often possible to move this check *before* you begin the calculation. This allows you to think fully about the calculation.
- This assignment is very geometric, so draw diagrams! The split part of the task has a decent amount of code, but many of the steps can be completed mostly independently. Setting up vertices, updating pointers, creating all the halfEdges you need, etc. can all be ticked off one-by-one with a good diagram.
### DCEL Splits with Pairs
The Doubly Connected Edge List assumes that each half-edge is connected to exactly one other half-edge, this implicitly means that a split of an edge on one side will create a half-edge on the other side, even though this split is not "necessary" to represent the geometry. See in this example how a split originating from the grey midpoint on the left half-edge also produces a new half-edge on the paired half-edge.
![](./images/image07.png)
If an edge has no paired half-edge, we of course do not need to split its half-edge pair.
Note also that this new half-edge splits an edge which previously was associated with one face, which gives us a few simpler steps:
- The new paired half-edge has the same face.
- Because the original half-edge is split, you only need to connect the old half-edge to the new half-edge (the new edge will be inserted before or after in the ordering), the other side of the half-edge will remain correct without modification.
- You can then connect the remaining surrounding half-edge to the new half-edge.
- If the new half-edge is inserted before the old half-edge, you'll need to connect the next pointer of the old previous half-edge to the new half-edge.
- If the new half-edge is inserted after the old half-edge, you'll need to connect the prev pointer of the previous half-edge to the new half-edge.
### Determining Whether a Given Point is in a Particular Face
To see if a point is in a particular face, we highlight the idea of a half-plane. A half-plane is essentially all the points on one side of a particular line. If a point is in the correct half-plane for all halfEdges in a particular face. Because you can assume all polygons constructed are convex, this check need only verify the point is on the *same side* of the half-plane for all halfEdges in the face. To check this, you can start at the first halfEdge in the face and traverse all halfEdges in the face until you return back to the first halfEdge.
### Determining Which Side a Given Point is of a Half-Plane
There are two cases for half-plane checking which you might have to look at:
![](./images/image08.png)
1. In the first case, the x-coordinate of both the start and end vertex are the same. Because we use what's known as a clockwise winding order, if the point we're checking has a greater x-coordinate then it will lie inside the shape. Otherwise it lies outside the point.
2. In the second case, we can use the simple $y = mx + c$ formula.
- First we calculate the gradient, $m$, and intercept, $c$
$m = \frac{y_2 - y_1}{x_2 - x_1}$, $c = y_2 - mx_2$
- We then use this gradient and intercept to see what we'd expect the point's $y$-coordinate to be if it lay on the line between $v_1$ and $v_2$
$y_{predicted} = mx + c$
- We then use this value to see where the $y$-coordinate is in relation to this value
$y_r = y - y_{predicted}$
- If $yr  0$, the point is inside the shape.
Note that the above only applies when the points forming the half-edge are ordered by increasing $x$-coordinate (or increasing $y$-coordinate in the case of equal $x$-coordinates). When the order is $x$-coordinate is decreasing (or $x$-coordinate is equal and $y$-coordinate is decreasing), we look for the opposite relations.
![](./images/image09.png)
- When $x_1 = x_2$ and $y_1  y_2$, the point is in the shape if $x ≤ x_1$.
- Otherwise, if $x_1  x_2$ and $yr  0$, the point is in the shape.
### Updating changing faces
Every time you add a split to your DCEL data structure, you will create exactly one extra face. You can start at the edge on the other side of the new edge comprising the split, updating every face until you return to the original edge.
However, there is one risk here! The face refers to one half-edge in the face, if we aren't careful, we might change the half-edge we've made the face refer to the new face - leading to two edges which both refer to the same face. The solution here is simple, check if the face of the edge on the side you didn't update isn't still in the right face. If it isn't, update the face to point to a half-edge on the other side.
### Debugging
Though debugging is very much a general skill for most of the task, debugging geometric or structured information can present an additional challenge! We will provide some tools you can use to visualise and investigate the geometric properties of your solution, but there are three stages which more targeted debugging might help with, they range from fastest to most in-depth and thorough.
1. In the first stage, it's worth checking whether all your points are being set up correctly (e.g. vertices are in the right locations, the watchtowers are in the right areas, etc.).
2. In the second stage, the geometry may look mostly okay, but may have small errors, here you can use drawn diagrams to check that you've set all the values correctly! Using the click actions can help check each edge and each vertex is in the place you think it should be.
3. In the third stage, if all the geometry appears to be correct, set a breakpoint at the end of the split being applied and move through the next pointers, checking that everything makes sense (e.g. `startVertex` of the next edge is the `endVertex` of its preceding edge), and that all the faces are correct.
## Plagarism
This is an individual assignment. The work must be your own.
While you may discuss your program development, coding problems and experimentation with your classmates, you must not share files, as this is considered plagiarism.
If you refer to published work in the discussion of your experiments, be sure to include a citation to the publication or the web link.
“Borrowing” of someone elses code without acknowledgment is plagiarism. Plagiarism is considered a serious offense at the University of Melbourne. You should read the University code on Academic integrity and details on plagiarism. Make sure you are not plagiarizing, intentionally or unintentionally.
You are also advised that there will be a C programming component (on paper, not on a computer) in the final examination. Students who do not program their own assignments will be at a disadvantage for this part of the examination.
## Late Policy
The late penalty is 10% of the available marks for that project for each day (or part thereof) overdue. Requests for extensions on medical grounds will need to be supported by a medical certificate. Any request received less than 48 hours before the assessment date (or after the date!) will generally not be accepted except in the most extreme circumstances. In general, extensions will not be granted if the interruption covers less than 10% of the project duration. Remember that departmental servers are often heavily loaded near project deadlines, and unexpected outages can occur; these will not be considered as grounds for an extension.
Students who experience difficulties due to personal circumstances are encouraged to make use of the appropriate University student support services, and to contact the lecturer, at the earliest opportunity.
Finally, we are here to help! There is information about getting help in this subject on the LMS. Frequently asked questions about the project will be answered on Ed.

BIN
docs/images/image01.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

BIN
docs/images/image02.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 KiB

BIN
docs/images/image03.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 656 KiB

BIN
docs/images/image04.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

BIN
docs/images/image05.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

BIN
docs/images/image06.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

BIN
docs/images/image07.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

BIN
docs/images/image08.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
docs/images/image09.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
docs/images/image10.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

BIN
docs/images/image11.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.2 KiB

BIN
docs/images/image12.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

BIN
docs/images/image13.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

BIN
docs/images/image14.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

BIN
docs/images/image15.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

BIN
docs/images/image16.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

298
docs/programming-style.c Normal file
View file

@ -0,0 +1,298 @@
/** ***********************
* C Programming Style for Engineering Computation
* Created by Aidan Nagorcka-Smith (aidann@student.unimelb.edu.au) 13/03/2011
* Definitions and includes
* Definitions are in UPPER_CASE
* Includes go before definitions
* Space between includes, definitions and the main function.
* Use definitions for any constants in your program, do not just write them
* in.
*
* Tabs may be set to 4-spaces or 8-spaces, depending on your editor. The code
* Below is ``gnu'' style. If your editor has ``bsd'' it will follow the 8-space
* style. Both are very standard.
*/
/**
* GOOD:
*/
#include <stdio.h>
#include <stdlib.h>
#define MAX_STRING_SIZE 1000
#define DEBUG 0
int main(int argc, char **argv) {
...
/**
* BAD:
*/
/* Definitions and includes are mixed up */
#include <stdlib.h>
#define MAX_STING_SIZE 1000
/* Definitions are given names like variables */
#define debug 0
#include <stdio.h>
/* No spacing between includes, definitions and main function*/
int main(int argc, char **argv) {
...
/** *****************************
* Variables
* Give them useful lower_case names or camelCase. Either is fine,
* as long as you are consistent and apply always the same style.
* Initialise them to something that makes sense.
*/
/**
* GOOD: lower_case
*/
int main(int argc, char **argv) {
int i = 0;
int num_fifties = 0;
int num_twenties = 0;
int num_tens = 0;
...
/**
* GOOD: camelCase
*/
int main(int argc, char **argv) {
int i = 0;
int numFifties = 0;
int numTwenties = 0;
int numTens = 0;
...
/**
* BAD:
*/
int main(int argc, char **argv) {
/* Variable not initialised - causes a bug because we didn't remember to
* set it before the loop */
int i;
/* Variable in all caps - we'll get confused between this and constants
*/
int NUM_FIFTIES = 0;
/* Overly abbreviated variable names make things hard. */
int nt = 0
while (i < 10) {
...
i++;
}
...
/** ********************
* Spacing:
* Space intelligently, vertically to group blocks of code that are doing a
* specific operation, or to separate variable declarations from other code.
* One tab of indentation within either a function or a loop.
* Spaces after commas.
* Space between ) and {.
* No space between the ** and the argv in the definition of the main
* function.
* When declaring a pointer variable or argument, you may place the asterisk
* adjacent to either the type or to the variable name.
* Lines at most 80 characters long.
* Closing brace goes on its own line
*/
/**
* GOOD:
*/
int main(int argc, char **argv) {
int i = 0;
for(i = 100; i >= 0; i--) {
if (i > 0) {
printf("%d bottles of beer, take one down and pass it around,"
" %d bottles of beer.\n", i, i - 1);
} else {
printf("%d bottles of beer, take one down and pass it around."
" We're empty.\n", i);
}
}
return 0;
}
/**
* BAD:
*/
/* No space after commas
* Space between the ** and argv in the main function definition
* No space between the ) and { at the start of a function */
int main(int argc,char ** argv){
int i = 0;
/* No space between variable declarations and the rest of the function.
* No spaces around the boolean operators */
for(i=100;i>=0;i--) {
/* No indentation */
if (i > 0) {
/* Line too long */
printf("%d bottles of beer, take one down and pass it around, %d
bottles of beer.\n", i, i - 1);
} else {
/* Spacing for no good reason. */
printf("%d bottles of beer, take one down and pass it around."
" We're empty.\n", i);
}
}
/* Closing brace not on its own line */
return 0;}
/** ****************
* Braces:
* Opening braces go on the same line as the loop or function name
* Closing braces go on their own line
* Closing braces go at the same indentation level as the thing they are
* closing
*/
/**
* GOOD:
*/
int main(int argc, char **argv) {
...
for(...) {
...
}
return 0;
}
/**
* BAD:
*/
int main(int argc, char **argv) {
...
/* Opening brace on a different line to the for loop open */
for(...)
{
...
/* Closing brace at a different indentation to the thing it's
closing
*/
}
/* Closing brace not on its own line. */
return 0;}
/** **************
* Commenting:
* Each program should have a comment explaining what it does and who created
* it.
* Also comment how to run the program, including optional command line
* parameters.
* Any interesting code should have a comment to explain itself.
* We should not comment obvious things - write code that documents itself
*/
/**
* GOOD:
*/
/* change.c
*
* Created by Aidan Nagorcka-Smith (aidann@student.unimelb.edu.au)
13/03/2011
*
* Print the number of each coin that would be needed to make up some
change
* that is input by the user
*
* To run the program type:
* ./coins --num_coins 5 --shape_coins trapezoid --output blabla.txt
*
* To see all the input parameters, type:
* ./coins --help
* Options::
* --help Show help message
* --num_coins arg Input number of coins
* --shape_coins arg Input coins shape
* --bound arg (=1) Max bound on xxx, default value 1
* --output arg Output solution file
*
*/
int main(int argc, char **argv) {
int input_change = 0;
printf("Please input the value of the change (0-99 cents
inclusive):\n");
scanf("%d", &input_change);
printf("\n");
// Valid change values are 0-99 inclusive.
if(input_change < 0 || input_change > 99) {
printf("Input not in the range 0-99.\n")
}
...
/**
* BAD:
*/
/* No explanation of what the program is doing */
int main(int argc, char **argv) {
/* Commenting obvious things */
/* Create a int variable called input_change to store the input from
the
* user. */
int input_change;
...
/** ****************
* Code structure:
* Fail fast - input checks should happen first, then do the computation.
* Structure the code so that all error handling happens in an easy to read
* location
*/
/**
* GOOD:
*/
if (input_is_bad) {
printf("Error: Input was not valid. Exiting.\n");
exit(EXIT_FAILURE);
}
/* Do computations here */
...
/**
* BAD:
*/
if (input_is_good) {
/* lots of computation here, pushing the else part off the screen.
*/
...
} else {
fprintf(stderr, "Error: Input was not valid. Exiting.\n");
exit(EXIT_FAILURE);
}

BIN
main.o

Binary file not shown.

View file

106
common.c → src/common.c Executable file → Normal file
View file

@ -1,53 +1,53 @@
/* common.c /* common.c
* *
* Created by Rory Healy (healyr@student.unimelb.edu.au) * Created by Rory Healy (healyr@student.unimelb.edu.au)
* Created on 25th August 2021 * Created on 25th August 2021
* Last modified 25th August 2021 * Last modified 25th August 2021
* *
* Contains functions for general use throughout other files. * Contains functions for general use throughout other files.
* *
*/ */
#ifndef COMMON_HEADER #ifndef COMMON_HEADER
#include "common.h" #include "common.h"
#endif #endif
#define ARGC_CORRECT_LEN 4 #define ARGC_CORRECT_LEN 4
#define MEMORY_ALLOCATION_ERROR "Error: Cannot allocate memory.\n" #define MEMORY_ALLOCATION_ERROR "Error: Cannot allocate memory.\n"
#define OPEN_FILE_ERROR "Error: Unable to open file %s\n" #define OPEN_FILE_ERROR "Error: Unable to open file %s\n"
#define NUM_FILE_ERROR "Error: Incorrect number of inputs (3 required).\n" #define NUM_FILE_ERROR "Error: Incorrect number of inputs (3 required).\n"
/* Checks if a given pointer is null. Used for malloc() and realloc(). */ /* Checks if a given pointer is null. Used for malloc() and realloc(). */
void checkNullPointer(void *ptr) { void checkNullPointer(void *ptr) {
if (!ptr) { if (!ptr) {
fputs(MEMORY_ALLOCATION_ERROR, stderr); fputs(MEMORY_ALLOCATION_ERROR, stderr);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
} }
/* Checks the validity of the command line input arguments */ /* Checks the validity of the command line input arguments */
void checkInputArgs(int argc, char **argv, FILE **datasetFile, \ void checkInputArgs(int argc, char **argv, FILE **datasetFile, \
FILE **polygonFile, FILE **outputFile) { FILE **polygonFile, FILE **outputFile) {
if (argc != ARGC_CORRECT_LEN) { if (argc != ARGC_CORRECT_LEN) {
fputs(NUM_FILE_ERROR, stderr); fputs(NUM_FILE_ERROR, stderr);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
*datasetFile = fopen(argv[1], "r"); *datasetFile = fopen(argv[1], "r");
if (*datasetFile == NULL) { if (*datasetFile == NULL) {
fprintf(stderr, OPEN_FILE_ERROR, argv[1]); fprintf(stderr, OPEN_FILE_ERROR, argv[1]);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
*polygonFile = fopen(argv[2], "r"); *polygonFile = fopen(argv[2], "r");
if (*polygonFile == NULL) { if (*polygonFile == NULL) {
fprintf(stderr, OPEN_FILE_ERROR, argv[2]); fprintf(stderr, OPEN_FILE_ERROR, argv[2]);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
*outputFile = fopen(argv[3], "w"); *outputFile = fopen(argv[3], "w");
if (*outputFile == NULL) { if (*outputFile == NULL) {
fprintf(stderr, OPEN_FILE_ERROR, argv[3]); fprintf(stderr, OPEN_FILE_ERROR, argv[3]);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
} }

46
common.h → src/common.h Executable file → Normal file
View file

@ -1,23 +1,23 @@
#ifndef STDIO_HEADER #ifndef STDIO_HEADER
#define STDIO_HEADER #define STDIO_HEADER
#include <stdio.h> #include <stdio.h>
#endif #endif
#ifndef STDLIB_HEADER #ifndef STDLIB_HEADER
#define STDLIB_HEADER #define STDLIB_HEADER
#include <stdlib.h> #include <stdlib.h>
#endif #endif
#ifndef COMMON_HEADER #ifndef COMMON_HEADER
#define COMMON_HEADER #define COMMON_HEADER
void checkNullPointer(void *ptr); void checkNullPointer(void *ptr);
void checkInputArgs(int argc, char **argv, FILE **datasetFile, \ void checkInputArgs(int argc, char **argv, FILE **datasetFile, \
FILE **polygonFile, FILE **outputFile); FILE **polygonFile, FILE **outputFile);
#endif #endif

136
dcel.c → src/dcel.c Executable file → Normal file
View file

@ -1,68 +1,68 @@
/* dcel.c /* dcel.c
* *
* Created by Rory Healy (healyr@student.unimelb.edu.au) * Created by Rory Healy (healyr@student.unimelb.edu.au)
* Created on 25th August 2021 * Created on 25th August 2021
* Last modified 25th August 2021 * Last modified 25th August 2021
* *
* Contains functions for the DCEL data structure, including creating, * Contains functions for the DCEL data structure, including creating,
* splitting an edge, and identifying towers in faces. * splitting an edge, and identifying towers in faces.
* *
*/ */
#ifndef DCEL_HEADER #ifndef DCEL_HEADER
#include "dcel.h" #include "dcel.h"
#endif #endif
#ifndef COMMON_HEADER #ifndef COMMON_HEADER
#include "common.h" #include "common.h"
#endif #endif
struct halfEdge { struct halfEdge {
halfEdge_t *previous; halfEdge_t *previous;
halfEdge_t *next; halfEdge_t *next;
halfEdge_t *twin; halfEdge_t *twin;
int face; int face;
int edge; int edge;
}; };
struct vertex { struct vertex {
double x; double x;
double y; double y;
}; };
struct edge { struct edge {
halfEdge_t halfEdge; halfEdge_t halfEdge;
}; };
struct face { struct face {
halfEdge_t start; halfEdge_t start;
}; };
/* Reads the polygon file and stores the information in the vertices array. */ /* Reads the polygon file and stores the information in the vertices array. */
vertex_t **readPolygon(vertex_t **vertices, FILE *polygonFile, int *numVertices) { vertex_t **readPolygon(vertex_t **vertices, FILE *polygonFile, int *numVertices) {
double currentX, currentY; double currentX, currentY;
int maxSizeVertices = 1; int maxSizeVertices = 1;
while ((fscanf(polygonFile, "%lf %lf", &currentX, &currentY)) != EOF) { while ((fscanf(polygonFile, "%lf %lf", &currentX, &currentY)) != EOF) {
/* Check if there enough space in the towers array */ /* Check if there enough space in the towers array */
if (*numVertices == maxSizeVertices) { if (*numVertices == maxSizeVertices) {
maxSizeVertices *= 2; maxSizeVertices *= 2;
vertex_t **temp = realloc(vertices, maxSizeVertices * sizeof(*vertices)); vertex_t **temp = realloc(vertices, maxSizeVertices * sizeof(*vertices));
checkNullPointer(temp); checkNullPointer(temp);
vertices = temp; vertices = temp;
} }
/* The current vertex being filled in with information */ /* The current vertex being filled in with information */
vertices[*numVertices] = malloc(sizeof(*vertices[*numVertices])); vertices[*numVertices] = malloc(sizeof(*vertices[*numVertices]));
vertices[*numVertices]->x = currentX; vertices[*numVertices]->x = currentX;
vertices[*numVertices]->y = currentY; vertices[*numVertices]->y = currentY;
*numVertices += 1; *numVertices += 1;
} }
return vertices; return vertices;
} }
void freeVertices(vertex_t **vertices, int numVertices) { void freeVertices(vertex_t **vertices, int numVertices) {
for (int i = 0; i < numVertices; i++) { for (int i = 0; i < numVertices; i++) {
free(vertices[i]); free(vertices[i]);
} }
free(vertices); free(vertices);
} }

40
dcel.h → src/dcel.h Executable file → Normal file
View file

@ -1,20 +1,20 @@
#ifndef STDIO_HEADER #ifndef STDIO_HEADER
#define STDIO_HEADER #define STDIO_HEADER
#include <stdio.h> #include <stdio.h>
#endif #endif
#ifndef DCEL_HEADER #ifndef DCEL_HEADER
#define DCEL_HEADER #define DCEL_HEADER
typedef struct halfEdge halfEdge_t; typedef struct halfEdge halfEdge_t;
typedef struct vertex vertex_t; typedef struct vertex vertex_t;
typedef struct edge edge_t; typedef struct edge edge_t;
typedef struct face face_t; typedef struct face face_t;
vertex_t **readPolygon(vertex_t **vertices, FILE *polygonFile, \ vertex_t **readPolygon(vertex_t **vertices, FILE *polygonFile, \
int *numVertices); int *numVertices);
void freeVertices(vertex_t **vertices, int numVertices); void freeVertices(vertex_t **vertices, int numVertices);
#endif #endif

128
main.c → src/main.c Executable file → Normal file
View file

@ -1,64 +1,64 @@
/* main.c /* main.c
* *
* Created by Rory Healy (healyr@student.unimelb.edu.au) * Created by Rory Healy (healyr@student.unimelb.edu.au)
* Created on 25th August 2021 * Created on 25th August 2021
* Last modified 25th August 2021 * Last modified 25th August 2021
* *
* Lists the watchtowers that are in each face of the polygon. * Lists the watchtowers that are in each face of the polygon.
* The polygon can be split using a pair of integers, which represent * The polygon can be split using a pair of integers, which represent
* the edge numbers that should be connected. This comes from stdin. * the edge numbers that should be connected. This comes from stdin.
* *
* To run the program type: * To run the program type:
* ./voronoi1 dataset_file polygon_file output_file < splits * ./voronoi1 dataset_file polygon_file output_file < splits
* *
* Options: * Options:
* dataset_file required Path to the dataset file (CSV) * dataset_file required Path to the dataset file (CSV)
* polygon_file required Path to the polygon file (txt) * polygon_file required Path to the polygon file (txt)
* output_file required Output solution file * output_file required Output solution file
* splits optional Pairs of integers to split the edges * splits optional Pairs of integers to split the edges
* *
*/ */
#ifndef DCEL_HEADER #ifndef DCEL_HEADER
#include "dcel.h" #include "dcel.h"
#endif #endif
#ifndef COMMON_HEADER #ifndef COMMON_HEADER
#include "common.h" #include "common.h"
#endif #endif
#ifndef VORONOI_HEADER #ifndef VORONOI_HEADER
#include "voronoi.h" #include "voronoi.h"
#endif #endif
int main(int argc, char **argv) { int main(int argc, char **argv) {
/* Input and output files */ /* Input and output files */
FILE *datasetFile = NULL, *polygonFile = NULL, *outputFile = NULL; FILE *datasetFile = NULL, *polygonFile = NULL, *outputFile = NULL;
checkInputArgs(argc, argv, &datasetFile, &polygonFile, &outputFile); checkInputArgs(argc, argv, &datasetFile, &polygonFile, &outputFile);
/* Stores information about the towers given in dataset file */ /* Stores information about the towers given in dataset file */
tower_t **towers = malloc(sizeof(*towers)); tower_t **towers = malloc(sizeof(*towers));
checkNullPointer(towers); checkNullPointer(towers);
int numTowers = 0; int numTowers = 0;
towers = readTowers(towers, datasetFile, &numTowers); towers = readTowers(towers, datasetFile, &numTowers);
/* Stores information about the vertices in the polygon file */ /* Stores information about the vertices in the polygon file */
vertex_t **vertices = malloc(sizeof(*vertices)); vertex_t **vertices = malloc(sizeof(*vertices));
checkNullPointer(vertices); checkNullPointer(vertices);
int numVertices = 0; int numVertices = 0;
vertices = readPolygon(vertices, polygonFile, &numVertices); vertices = readPolygon(vertices, polygonFile, &numVertices);
/* Create DCEL structure from vertices */ /* Create DCEL structure from vertices */
/* Check for splits, split the polygon if needed */ /* Check for splits, split the polygon if needed */
/* Counts towers in each polygon, outputs to outputFile */ /* Counts towers in each polygon, outputs to outputFile */
// changing something here // changing something here
/* Cleaning up data */ /* Cleaning up data */
freeTowers(towers, numTowers); freeTowers(towers, numTowers);
freeVertices(vertices, numVertices); freeVertices(vertices, numVertices);
fclose(datasetFile); fclose(datasetFile);
fclose(polygonFile); fclose(polygonFile);
fclose(outputFile); fclose(outputFile);
return 0; return 0;
} }

244
voronoi.c → src/voronoi.c Executable file → Normal file
View file

@ -1,122 +1,122 @@
/* voronoi.c /* voronoi.c
* *
* Created by Rory Healy (healyr@student.unimelb.edu.au) * Created by Rory Healy (healyr@student.unimelb.edu.au)
* Created on 12th August 2021 * Created on 12th August 2021
* Last modified 25th August 2021 * Last modified 25th August 2021
* *
* Contains functions involving the reading of the dataset CSV file. * Contains functions involving the reading of the dataset CSV file.
* *
*/ */
#ifndef COMMON_HEADER #ifndef COMMON_HEADER
#include "common.h" #include "common.h"
#endif #endif
#ifndef VORONOI_HEADER #ifndef VORONOI_HEADER
#include "voronoi.h" #include "voronoi.h"
#endif #endif
#include <string.h> #include <string.h>
#define BASE_10 10 #define BASE_10 10
#define MAX_CSV_ENTRY_LEN 512 #define MAX_CSV_ENTRY_LEN 512
#define MAX_FIELD_LEN 128 #define MAX_FIELD_LEN 128
#define NUM_CSV_FIELDS 6 #define NUM_CSV_FIELDS 6
struct tower { struct tower {
char *id; char *id;
char *postcode; char *postcode;
char *manager; char *manager;
int population; int population;
double x; double x;
double y; double y;
}; };
/* Reads the CSV file and stores the information in the towers array. */ /* Reads the CSV file and stores the information in the towers array. */
tower_t **readTowers(tower_t **towers, FILE* datasetFile, int *numTowers) { tower_t **readTowers(tower_t **towers, FILE* datasetFile, int *numTowers) {
/* Maximum length of a single CSV line */ /* Maximum length of a single CSV line */
size_t lineBufferSize = MAX_CSV_ENTRY_LEN + 1; size_t lineBufferSize = MAX_CSV_ENTRY_LEN + 1;
/* Stores the current line from the CSV */ /* Stores the current line from the CSV */
char *lineBuffer = malloc(lineBufferSize * sizeof(char)); char *lineBuffer = malloc(lineBufferSize * sizeof(char));
checkNullPointer(lineBuffer); checkNullPointer(lineBuffer);
int maxSizetowers = 1; int maxSizetowers = 1;
/* Discard the header line, then read the rest of the CSV */ /* Discard the header line, then read the rest of the CSV */
getline(&lineBuffer, &lineBufferSize, datasetFile); getline(&lineBuffer, &lineBufferSize, datasetFile);
while (getline(&lineBuffer, &lineBufferSize, datasetFile) > 0) { while (getline(&lineBuffer, &lineBufferSize, datasetFile) > 0) {
/* Check if there enough space in the towers array */ /* Check if there enough space in the towers array */
if (*numTowers == maxSizetowers) { if (*numTowers == maxSizetowers) {
maxSizetowers *= 2; maxSizetowers *= 2;
tower_t **temp = realloc(towers, maxSizetowers * sizeof(*towers)); tower_t **temp = realloc(towers, maxSizetowers * sizeof(*towers));
checkNullPointer(temp); checkNullPointer(temp);
towers = temp; towers = temp;
} }
/* The current tower being filled in with information */ /* The current tower being filled in with information */
towers[*numTowers] = malloc(sizeof(*towers[*numTowers])); towers[*numTowers] = malloc(sizeof(*towers[*numTowers]));
readCurrentLine(lineBuffer, towers[*numTowers]); readCurrentLine(lineBuffer, towers[*numTowers]);
*numTowers += 1; *numTowers += 1;
} }
free(lineBuffer); free(lineBuffer);
return towers; return towers;
} }
/* Takes a line from the CSV and converts the data into a tower_t format */ /* Takes a line from the CSV and converts the data into a tower_t format */
void readCurrentLine(char* lineBuffer, tower_t* tower) { void readCurrentLine(char* lineBuffer, tower_t* tower) {
/* Stores the current CSV field for the current line */ /* Stores the current CSV field for the current line */
char *token = strtok(lineBuffer, ","); char *token = strtok(lineBuffer, ",");
size_t tokenLength; size_t tokenLength;
for (int i = 0; i < NUM_CSV_FIELDS; i++) { for (int i = 0; i < NUM_CSV_FIELDS; i++) {
tokenLength = strlen(token); tokenLength = strlen(token);
switch(i) { switch(i) {
/* Case 0, 1, and 3 deal with strings /* Case 0, 1, and 3 deal with strings
* Case 2 deals with an integer * Case 2 deals with an integer
* Case 4 and 5 deal with doubles * Case 4 and 5 deal with doubles
* Each case is handled seperately to fill in the * Each case is handled seperately to fill in the
* tower with no space wasted. * tower with no space wasted.
*/ */
case 0: case 0:
tower->id = malloc(sizeof(char) * tokenLength + 1); tower->id = malloc(sizeof(char) * tokenLength + 1);
checkNullPointer(tower->id); checkNullPointer(tower->id);
strcpy(tower->id, token); strcpy(tower->id, token);
tower->id[tokenLength] = '\0'; tower->id[tokenLength] = '\0';
break; break;
case 1: case 1:
tower->postcode = malloc(sizeof(char) * tokenLength + 1); tower->postcode = malloc(sizeof(char) * tokenLength + 1);
checkNullPointer(tower->postcode); checkNullPointer(tower->postcode);
strcpy(tower->postcode, token); strcpy(tower->postcode, token);
tower->postcode[tokenLength] = '\0'; tower->postcode[tokenLength] = '\0';
break; break;
case 2: case 2:
tower->population = strtol(token, NULL, BASE_10); tower->population = strtol(token, NULL, BASE_10);
break; break;
case 3: case 3:
tower->manager = malloc(sizeof(char) * tokenLength + 1); tower->manager = malloc(sizeof(char) * tokenLength + 1);
checkNullPointer(tower->manager); checkNullPointer(tower->manager);
strcpy(tower->manager, token); strcpy(tower->manager, token);
tower->manager[tokenLength] = '\0'; tower->manager[tokenLength] = '\0';
break; break;
case 4: case 4:
tower->x = strtod(token, NULL); tower->x = strtod(token, NULL);
break; break;
case 5: case 5:
tower->y = strtod(token, NULL); tower->y = strtod(token, NULL);
break; break;
} }
token = strtok(NULL, ","); token = strtok(NULL, ",");
} }
} }
void freeTowers(tower_t **towers, int numTowers) { void freeTowers(tower_t **towers, int numTowers) {
for (int i = 0; i < numTowers; i++) { for (int i = 0; i < numTowers; i++) {
free(towers[i]->id); free(towers[i]->id);
free(towers[i]->manager); free(towers[i]->manager);
free(towers[i]->postcode); free(towers[i]->postcode);
free(towers[i]); free(towers[i]);
} }
free(towers); free(towers);
} }

0
voronoi.h → src/voronoi.h Executable file → Normal file
View file

View file

@ -1,8 +1,8 @@
142.993000 -33.122900 142.993000 -33.122900
147.597600 -33.221400 147.597600 -33.221400
150.054600 -36.590100 150.054600 -36.590100
150.400400 -39.229900 150.400400 -39.229900
147.779600 -40.333100 147.779600 -40.333100
144.412600 -40.195200 144.412600 -40.195200
140.736200 -39.289000 140.736200 -39.289000
140.335800 -37.476600 140.335800 -37.476600

View file

@ -1,4 +1,4 @@
140.9 -39.2 140.9 -39.2
140.9 -33.9 140.9 -33.9
150.0 -33.9 150.0 -33.9
150.0 -39.2 150.0 -39.2

View file

@ -1,3 +1,3 @@
0 3 0 3
5 8 5 8
6 11 6 11

View file

@ -1,4 +1,4 @@
0 3 0 3
5 8 5 8
6 11 6 11
13 7 13 7

View file

@ -1,5 +1,5 @@
0 3 0 3
5 8 5 8
6 11 6 11
13 7 13 7
16 14 16 14

View file

@ -1,2 +1,2 @@
Watchtower ID,Postcode,Population Served,Watchtower Point of Contact Name,x,y Watchtower ID,Postcode,Population Served,Watchtower Point of Contact Name,x,y
WT3765SHSPB,3765,3380,Eilene Horner,145.36201379669092,-37.81894302945288 WT3765SHSPB,3765,3380,Eilene Horner,145.36201379669092,-37.81894302945288
1 Watchtower ID Postcode Population Served Watchtower Point of Contact Name x y
2 WT3765SHSPB 3765 3380 Eilene Horner 145.36201379669092 -37.81894302945288

View file

@ -1,11 +1,11 @@
Watchtower ID,Postcode,Population Served,Watchtower Point of Contact Name,x,y Watchtower ID,Postcode,Population Served,Watchtower Point of Contact Name,x,y
WT3106HTUYW,3106,2374,David Bryan,145.14493956217032,-37.74550312585378 WT3106HTUYW,3106,2374,David Bryan,145.14493956217032,-37.74550312585378
WT3151ANFQX,3151,3424,Daniel Davis,145.16632131582105,-37.84908719684687 WT3151ANFQX,3151,3424,Daniel Davis,145.16632131582105,-37.84908719684687
WT3953SGAEI,3953,1571,Ofelia Kadlec,145.77800174296402,-38.55984015166651 WT3953SGAEI,3953,1571,Ofelia Kadlec,145.77800174296402,-38.55984015166651
WT3765SHSPB,3765,3380,Eilene Horner,145.36201379669092,-37.81894302945288 WT3765SHSPB,3765,3380,Eilene Horner,145.36201379669092,-37.81894302945288
WT3227LRSVA,3227,4819,Joan Cox,144.38837299987338,-38.22664848840161 WT3227LRSVA,3227,4819,Joan Cox,144.38837299987338,-38.22664848840161
WT3370XRAHI,3370,356,Tammy Compton,143.76050524940354,-37.17889378247109 WT3370XRAHI,3370,356,Tammy Compton,143.76050524940354,-37.17889378247109
WT3525YPKBW,3525,433,Denise Roberts,143.32090727836928,-36.14524876420747 WT3525YPKBW,3525,433,Denise Roberts,143.32090727836928,-36.14524876420747
WT3701KWYIQ,3701,269,Martha Moore,147.39302957919313,-36.254894160169314 WT3701KWYIQ,3701,269,Martha Moore,147.39302957919313,-36.254894160169314
WT3779NULEK,3779,197,Aida Kuhnle,146.11080887018696,-37.67951918079387 WT3779NULEK,3779,197,Aida Kuhnle,146.11080887018696,-37.67951918079387
WT3530RJWDT,3530,63,Troy Clark,143.0834668479817,-35.79299394885817 WT3530RJWDT,3530,63,Troy Clark,143.0834668479817,-35.79299394885817
1 Watchtower ID Postcode Population Served Watchtower Point of Contact Name x y
2 WT3106HTUYW 3106 2374 David Bryan 145.14493956217032 -37.74550312585378
3 WT3151ANFQX 3151 3424 Daniel Davis 145.16632131582105 -37.84908719684687
4 WT3953SGAEI 3953 1571 Ofelia Kadlec 145.77800174296402 -38.55984015166651
5 WT3765SHSPB 3765 3380 Eilene Horner 145.36201379669092 -37.81894302945288
6 WT3227LRSVA 3227 4819 Joan Cox 144.38837299987338 -38.22664848840161
7 WT3370XRAHI 3370 356 Tammy Compton 143.76050524940354 -37.17889378247109
8 WT3525YPKBW 3525 433 Denise Roberts 143.32090727836928 -36.14524876420747
9 WT3701KWYIQ 3701 269 Martha Moore 147.39302957919313 -36.254894160169314
10 WT3779NULEK 3779 197 Aida Kuhnle 146.11080887018696 -37.67951918079387
11 WT3530RJWDT 3530 63 Troy Clark 143.0834668479817 -35.79299394885817

View file

@ -1,101 +1,101 @@
Watchtower ID,Postcode,Population Served,Watchtower Point of Contact Name,x,y Watchtower ID,Postcode,Population Served,Watchtower Point of Contact Name,x,y
WT3023QBQJF,3023,12794,Sandra Jaynes,144.7116868675065,-37.79835253004884 WT3023QBQJF,3023,12794,Sandra Jaynes,144.7116868675065,-37.79835253004884
WT3037YAKEI,3037,25577,Paul Watson,144.7404381965215,-37.71057606210163 WT3037YAKEI,3037,25577,Paul Watson,144.7404381965215,-37.71057606210163
WT3810RRMDP,3810,47894,Shirl Bays,145.54377380709113,-38.11642115246884 WT3810RRMDP,3810,47894,Shirl Bays,145.54377380709113,-38.11642115246884
WT3550ANADF,3550,10084,Virginia Lumpkins,144.25225555806287,-36.7583657822827 WT3550ANADF,3550,10084,Virginia Lumpkins,144.25225555806287,-36.7583657822827
WT3754SXJZI,3754,6292,Henriette Mitchell,145.1619799395555,-37.61057382984485 WT3754SXJZI,3754,6292,Henriette Mitchell,145.1619799395555,-37.61057382984485
WT3754WSOKP,3754,6292,James Lopez,145.11378037030943,-37.60927638542337 WT3754WSOKP,3754,6292,James Lopez,145.11378037030943,-37.60927638542337
WT3046ADKBS,3046,8515,Morris Pring,144.94317380188164,-37.71659755462475 WT3046ADKBS,3046,8515,Morris Pring,144.94317380188164,-37.71659755462475
WT3178BQAJG,3178,5612,Malka Smith,145.26959423333145,-37.918875236595035 WT3178BQAJG,3178,5612,Malka Smith,145.26959423333145,-37.918875236595035
WT3130PLSQY,3130,8043,Jose Hayes,145.13764760079675,-37.828083908584475 WT3130PLSQY,3130,8043,Jose Hayes,145.13764760079675,-37.828083908584475
WT3032PWVMB,3032,7362,William Mackiewicz,144.87559681642185,-37.79083145310446 WT3032PWVMB,3032,7362,William Mackiewicz,144.87559681642185,-37.79083145310446
WT3173JKIEY,3173,5157,Teddy Mccauley,145.18948448769126,-37.992844271467284 WT3173JKIEY,3173,5157,Teddy Mccauley,145.18948448769126,-37.992844271467284
WT3122GVRSM,3122,11755,William Bell,145.0366394627393,-37.810997917513916 WT3122GVRSM,3122,11755,William Bell,145.0366394627393,-37.810997917513916
WT3171BGAEJ,3171,7238,Lila Levy,145.1337946019459,-37.92898751855743 WT3171BGAEJ,3171,7238,Lila Levy,145.1337946019459,-37.92898751855743
WT3128AQDRS,3128,6609,Sarah Kauffman,145.1295813912443,-37.82078823368618 WT3128AQDRS,3128,6609,Sarah Kauffman,145.1295813912443,-37.82078823368618
WT3219MZCMM,3219,4928,Charlie Gerber,144.37942394090373,-38.19362930153523 WT3219MZCMM,3219,4928,Charlie Gerber,144.37942394090373,-38.19362930153523
WT3170XJVWP,3170,9684,Lucy Lahay,145.17553159514887,-37.936150181976984 WT3170XJVWP,3170,9684,Lucy Lahay,145.17553159514887,-37.936150181976984
WT3031DMFGC,3031,6177,Caroline Luckenbach,144.90707048527796,-37.78767901585732 WT3031DMFGC,3031,6177,Caroline Luckenbach,144.90707048527796,-37.78767901585732
WT3015PKLER,3015,8736,Bill Kilbane,144.8979183219914,-37.82580808335247 WT3015PKLER,3015,8736,Bill Kilbane,144.8979183219914,-37.82580808335247
WT3106WQFPR,3106,2374,Mary Bass,145.14274097499288,-37.731835101044354 WT3106WQFPR,3106,2374,Mary Bass,145.14274097499288,-37.731835101044354
WT3106HTUYW,3106,2374,David Bryan,145.14493956217032,-37.74550312585378 WT3106HTUYW,3106,2374,David Bryan,145.14493956217032,-37.74550312585378
WT3352KHBBN,3352,15996,Richard Askew,143.60419898610786,-37.722432808576656 WT3352KHBBN,3352,15996,Richard Askew,143.60419898610786,-37.722432808576656
WT3079QORWG,3079,5329,Jerry Somogyi,145.05361972090736,-37.76092644646485 WT3079QORWG,3079,5329,Jerry Somogyi,145.05361972090736,-37.76092644646485
WT3850WPPZJ,3850,14779,Scott Buggie,146.99670975934802,-38.11120375121315 WT3850WPPZJ,3850,14779,Scott Buggie,146.99670975934802,-38.11120375121315
WT3400BOZRI,3400,14543,Tom Davis,142.2056868163526,-36.700923449995635 WT3400BOZRI,3400,14543,Tom Davis,142.2056868163526,-36.700923449995635
WT3123YZTIF,3123,7160,Paul Earwood,145.05955004240124,-37.82771644759941 WT3123YZTIF,3123,7160,Paul Earwood,145.05955004240124,-37.82771644759941
WT3224OGJJN,3224,1773,Shirley Hall,144.42849521054393,-38.218027859101916 WT3224OGJJN,3224,1773,Shirley Hall,144.42849521054393,-38.218027859101916
WT3137PJCVG,3137,1541,Yolanda Stern,145.32887887734955,-37.830025027117365 WT3137PJCVG,3137,1541,Yolanda Stern,145.32887887734955,-37.830025027117365
WT3305NMFYC,3305,3204,Larry Witter,141.29643421841453,-38.11167114301085 WT3305NMFYC,3305,3204,Larry Witter,141.29643421841453,-38.11167114301085
WT3305KWOFD,3305,3204,Judith Figueroa,141.25644777166127,-38.24079323443777 WT3305KWOFD,3305,3204,Judith Figueroa,141.25644777166127,-38.24079323443777
WT3025UXSIE,3025,2430,Willie Laigo,144.79429337101448,-37.82881778367748 WT3025UXSIE,3025,2430,Willie Laigo,144.79429337101448,-37.82881778367748
WT3437KHBPL,3437,3479,Charlotte Green,144.59696365066134,-37.48113208398435 WT3437KHBPL,3437,3479,Charlotte Green,144.59696365066134,-37.48113208398435
WT3151ANFQX,3151,3424,Daniel Davis,145.16632131582105,-37.84908719684687 WT3151ANFQX,3151,3424,Daniel Davis,145.16632131582105,-37.84908719684687
WT3019ASCJP,3019,3065,Charlotte Coutermarsh,144.85492421197495,-37.772589492919515 WT3019ASCJP,3019,3065,Charlotte Coutermarsh,144.85492421197495,-37.772589492919515
WT3019JIKGX,3019,3065,Vincent January,144.85730316799982,-37.7718018219131 WT3019JIKGX,3019,3065,Vincent January,144.85730316799982,-37.7718018219131
WT3764MKCUE,3764,4582,Alejandrina Salazar,144.970506104261,-37.15854276662507 WT3764MKCUE,3764,4582,Alejandrina Salazar,144.970506104261,-37.15854276662507
WT3730UTUPX,3730,2944,Curtis Johnson,145.8390200963087,-36.01276678240247 WT3730UTUPX,3730,2944,Curtis Johnson,145.8390200963087,-36.01276678240247
WT3054SQEQA,3054,8428,Eugene Salano,144.95861592679725,-37.783412869711185 WT3054SQEQA,3054,8428,Eugene Salano,144.95861592679725,-37.783412869711185
WT3620DPAMB,3620,4120,Ben Oneil,144.96824098896346,-36.398921729744224 WT3620DPAMB,3620,4120,Ben Oneil,144.96824098896346,-36.398921729744224
WT3804OQOOF,3804,2023,Jackie Smith,145.35298253700518,-37.98426462189473 WT3804OQOOF,3804,2023,Jackie Smith,145.35298253700518,-37.98426462189473
WT3909HFRJQ,3909,2633,Maria Rhodus,147.90601975805444,-37.764598529015366 WT3909HFRJQ,3909,2633,Maria Rhodus,147.90601975805444,-37.764598529015366
WT3953SGAEI,3953,1571,Ofelia Kadlec,145.77800174296402,-38.55984015166651 WT3953SGAEI,3953,1571,Ofelia Kadlec,145.77800174296402,-38.55984015166651
WT3953NPQQN,3953,1571,Peter Willer,146.04193592469497,-38.44633595871089 WT3953NPQQN,3953,1571,Peter Willer,146.04193592469497,-38.44633595871089
WT3765SHSPB,3765,3380,Eilene Horner,145.36201379669092,-37.81894302945288 WT3765SHSPB,3765,3380,Eilene Horner,145.36201379669092,-37.81894302945288
WT3027FZKQC,3027,3323,Angelo Hard,144.73167189283603,-37.85646049026309 WT3027FZKQC,3027,3323,Angelo Hard,144.73167189283603,-37.85646049026309
WT3996ZMYGL,3996,1846,Jennifer Adkins,145.7771574897382,-38.67107249698782 WT3996ZMYGL,3996,1846,Jennifer Adkins,145.7771574897382,-38.67107249698782
WT3498MDTSF,3498,1331,Eleanor Taylor,142.11562298936752,-34.22061676416581 WT3498MDTSF,3498,1331,Eleanor Taylor,142.11562298936752,-34.22061676416581
WT3498RRAYK,3498,1331,Walter Lemire,142.0934531574623,-34.258337189977496 WT3498RRAYK,3498,1331,Walter Lemire,142.0934531574623,-34.258337189977496
WT3984UBSFJ,3984,1041,Ned Johnson,145.61381415852048,-38.3660140349184 WT3984UBSFJ,3984,1041,Ned Johnson,145.61381415852048,-38.3660140349184
WT3227LRSVA,3227,4819,Joan Cox,144.38837299987338,-38.22664848840161 WT3227LRSVA,3227,4819,Joan Cox,144.38837299987338,-38.22664848840161
WT3950WWFHI,3950,2400,Donald Neil,145.789697571232,-38.44829776894874 WT3950WWFHI,3950,2400,Donald Neil,145.789697571232,-38.44829776894874
WT3842LLUAZ,3842,2391,Justin Butcher,146.43738290720543,-38.33409319136186 WT3842LLUAZ,3842,2391,Justin Butcher,146.43738290720543,-38.33409319136186
WT3225ZWRKT,3225,1352,Sierra Zelaya,144.63248453729392,-38.273920927385454 WT3225ZWRKT,3225,1352,Sierra Zelaya,144.63248453729392,-38.273920927385454
WT3797JXEYZ,3797,1738,Wade Seay,145.59525777895735,-37.85187937890587 WT3797JXEYZ,3797,1738,Wade Seay,145.59525777895735,-37.85187937890587
WT3980CXZJX,3980,1675,Marianne Gulledge,145.38407991603268,-38.234540388656654 WT3980CXZJX,3980,1675,Marianne Gulledge,145.38407991603268,-38.234540388656654
WT3862WPONG,3862,1578,Anthony Dawkins,147.33271058732282,-37.491238739170896 WT3862WPONG,3862,1578,Anthony Dawkins,147.33271058732282,-37.491238739170896
WT3202IDOPR,3202,1453,Shannon Bello,145.07561474247163,-37.947828524869706 WT3202IDOPR,3202,1453,Shannon Bello,145.07561474247163,-37.947828524869706
WT3304LTOER,3304,681,James Broadway,141.91304296053238,-38.08286392590754 WT3304LTOER,3304,681,James Broadway,141.91304296053238,-38.08286392590754
WT3478NOSNX,3478,614,Mary Wooster,143.190083774406,-36.70864776402552 WT3478NOSNX,3478,614,Mary Wooster,143.190083774406,-36.70864776402552
WT3373ZJBZG,3373,573,Helen Hu,143.40004730403342,-37.327257624451846 WT3373ZJBZG,3373,573,Helen Hu,143.40004730403342,-37.327257624451846
WT3373FDEUM,3373,573,Phyllis Hegyi,143.19424925274458,-37.38771716562931 WT3373FDEUM,3373,573,Phyllis Hegyi,143.19424925274458,-37.38771716562931
WT3370XRAHI,3370,356,Tammy Compton,143.76050524940354,-37.17889378247109 WT3370XRAHI,3370,356,Tammy Compton,143.76050524940354,-37.17889378247109
WT3673HXZDV,3673,346,June Matteson,145.99560167654946,-36.51826050506983 WT3673HXZDV,3673,346,June Matteson,145.99560167654946,-36.51826050506983
WT3943FFEHH,3943,398,Floyd Mcfaul,144.7219219690698,-38.32665967904324 WT3943FFEHH,3943,398,Floyd Mcfaul,144.7219219690698,-38.32665967904324
WT3937YBAGH,3937,762,Tyesha Evans,145.0385876851752,-38.37262744294901 WT3937YBAGH,3937,762,Tyesha Evans,145.0385876851752,-38.37262744294901
WT3786QKGRU,3786,506,Joe Pulaski,145.33261178176102,-37.876147897332174 WT3786QKGRU,3786,506,Joe Pulaski,145.33261178176102,-37.876147897332174
WT3321FSNXX,3321,759,James Mcintosh,144.00220559674338,-38.10453080180178 WT3321FSNXX,3321,759,James Mcintosh,144.00220559674338,-38.10453080180178
WT3525YPKBW,3525,433,Denise Roberts,143.32090727836928,-36.14524876420747 WT3525YPKBW,3525,433,Denise Roberts,143.32090727836928,-36.14524876420747
WT3231VKTTU,3231,418,Karl Evans,143.99174248566703,-38.47241568127852 WT3231VKTTU,3231,418,Karl Evans,143.99174248566703,-38.47241568127852
WT3231YSKOO,3231,418,Leontine Mcghee,144.07128861030645,-38.416049306559025 WT3231YSKOO,3231,418,Leontine Mcghee,144.07128861030645,-38.416049306559025
WT3766LYICC,3766,619,Gary Evans,145.3953639008541,-37.81880414343826 WT3766LYICC,3766,619,Gary Evans,145.3953639008541,-37.81880414343826
WT3381FUDIA,3381,151,Penny Carrier,142.7602629758581,-37.02897861269415 WT3381FUDIA,3381,151,Penny Carrier,142.7602629758581,-37.02897861269415
WT3232GSLYH,3232,1114,Joshua Sickafoose,143.96111969797116,-38.544885004427805 WT3232GSLYH,3232,1114,Joshua Sickafoose,143.96111969797116,-38.544885004427805
WT3933UXXXP,3933,549,Shaun Guffey,145.11706009902144,-38.26228415412558 WT3933UXXXP,3933,549,Shaun Guffey,145.11706009902144,-38.26228415412558
WT3701KWYIQ,3701,269,Martha Moore,147.39302957919313,-36.254894160169314 WT3701KWYIQ,3701,269,Martha Moore,147.39302957919313,-36.254894160169314
WT3701TPSEH,3701,269,Grant Kennedy,147.41241338695838,-36.74234154193107 WT3701TPSEH,3701,269,Grant Kennedy,147.41241338695838,-36.74234154193107
WT3312BCEJQ,3312,1031,Alexandra Ratzlaff,141.38649875710092,-37.85213620536482 WT3312BCEJQ,3312,1031,Alexandra Ratzlaff,141.38649875710092,-37.85213620536482
WT3332VSYVL,3332,338,Charles Koons,144.08742265383532,-37.906318691909874 WT3332VSYVL,3332,338,Charles Koons,144.08742265383532,-37.906318691909874
WT3623CXKIC,3623,224,Rebecca Lara,144.90863570166192,-36.44103547317975 WT3623CXKIC,3623,224,Rebecca Lara,144.90863570166192,-36.44103547317975
WT3289ZSWDS,3289,378,Kim Hall,142.1760506248015,-37.83343114690931 WT3289ZSWDS,3289,378,Kim Hall,142.1760506248015,-37.83343114690931
WT3728YZARW,3728,318,Heather Cummings,145.8168813215635,-36.115027477064245 WT3728YZARW,3728,318,Heather Cummings,145.8168813215635,-36.115027477064245
WT3633WGRXB,3633,201,John Miller,145.48023893751045,-36.2875408553956 WT3633WGRXB,3633,201,John Miller,145.48023893751045,-36.2875408553956
WT3633UVHAO,3633,201,Michael Price,145.51505172180683,-36.31027112244356 WT3633UVHAO,3633,201,Michael Price,145.51505172180683,-36.31027112244356
WT3637KIERO,3637,198,Robert Dow,145.25553090556156,-36.0980796504903 WT3637KIERO,3637,198,Robert Dow,145.25553090556156,-36.0980796504903
WT3063WZIQE,3063,114,James Miller,144.81061694155076,-37.553501843305575 WT3063WZIQE,3063,114,James Miller,144.81061694155076,-37.553501843305575
WT3334GGKOS,3334,141,Elizabet Benson,144.1621690362788,-37.67891238372265 WT3334GGKOS,3334,141,Elizabet Benson,144.1621690362788,-37.67891238372265
WT3251FUJSG,3251,522,Lisa Voegele,143.5797389397756,-38.1623931117428 WT3251FUJSG,3251,522,Lisa Voegele,143.5797389397756,-38.1623931117428
WT3649NJHAF,3649,86,Catherine Ortiz,145.70444412227315,-36.12591041370753 WT3649NJHAF,3649,86,Catherine Ortiz,145.70444412227315,-36.12591041370753
WT3287NEKVB,3287,216,Joel Simmons,142.26305043381535,-37.983480961999916 WT3287NEKVB,3287,216,Joel Simmons,142.26305043381535,-37.983480961999916
WT3407PYOAR,3407,420,Gale Martin,141.83324586447986,-37.2859635851256 WT3407PYOAR,3407,420,Gale Martin,141.83324586447986,-37.2859635851256
WT3779NULEK,3779,197,Aida Kuhnle,146.11080887018696,-37.67951918079387 WT3779NULEK,3779,197,Aida Kuhnle,146.11080887018696,-37.67951918079387
WT3719TVVJM,3719,122,Brent Bautista,145.6864773045679,-37.03188286944955 WT3719TVVJM,3719,122,Brent Bautista,145.6864773045679,-37.03188286944955
WT3719HLABD,3719,122,Alfred Too,145.52985920519603,-36.964844896202216 WT3719HLABD,3719,122,Alfred Too,145.52985920519603,-36.964844896202216
WT3573DPVGU,3573,111,Wiley Palmer,144.15009214850954,-36.12318035418112 WT3573DPVGU,3573,111,Wiley Palmer,144.15009214850954,-36.12318035418112
WT3254RXAVL,3254,310,Amy Pugh,143.54387071993327,-38.308515316326016 WT3254RXAVL,3254,310,Amy Pugh,143.54387071993327,-38.308515316326016
WT3832NHOOV,3832,247,Bryan Warren,146.0154412945935,-37.93424551655733 WT3832NHOOV,3832,247,Bryan Warren,146.0154412945935,-37.93424551655733
WT3238BOTYW,3238,72,Bernard Jackson,143.567776369521,-38.625836774939955 WT3238BOTYW,3238,72,Bernard Jackson,143.567776369521,-38.625836774939955
WT3238MCUPV,3238,72,Nellie Banks,143.56196753560545,-38.82942446565583 WT3238MCUPV,3238,72,Nellie Banks,143.56196753560545,-38.82942446565583
WT3375LAJLR,3375,104,Emma Boatwright,143.2980117885972,-37.372200644973155 WT3375LAJLR,3375,104,Emma Boatwright,143.2980117885972,-37.372200644973155
WT3530RJWDT,3530,63,Troy Clark,143.0834668479817,-35.79299394885817 WT3530RJWDT,3530,63,Troy Clark,143.0834668479817,-35.79299394885817
WT3596HBEUF,3596,47,Jose Robertson,143.15095468769667,-35.190473662123345 WT3596HBEUF,3596,47,Jose Robertson,143.15095468769667,-35.190473662123345
1 Watchtower ID Postcode Population Served Watchtower Point of Contact Name x y
2 WT3023QBQJF 3023 12794 Sandra Jaynes 144.7116868675065 -37.79835253004884
3 WT3037YAKEI 3037 25577 Paul Watson 144.7404381965215 -37.71057606210163
4 WT3810RRMDP 3810 47894 Shirl Bays 145.54377380709113 -38.11642115246884
5 WT3550ANADF 3550 10084 Virginia Lumpkins 144.25225555806287 -36.7583657822827
6 WT3754SXJZI 3754 6292 Henriette Mitchell 145.1619799395555 -37.61057382984485
7 WT3754WSOKP 3754 6292 James Lopez 145.11378037030943 -37.60927638542337
8 WT3046ADKBS 3046 8515 Morris Pring 144.94317380188164 -37.71659755462475
9 WT3178BQAJG 3178 5612 Malka Smith 145.26959423333145 -37.918875236595035
10 WT3130PLSQY 3130 8043 Jose Hayes 145.13764760079675 -37.828083908584475
11 WT3032PWVMB 3032 7362 William Mackiewicz 144.87559681642185 -37.79083145310446
12 WT3173JKIEY 3173 5157 Teddy Mccauley 145.18948448769126 -37.992844271467284
13 WT3122GVRSM 3122 11755 William Bell 145.0366394627393 -37.810997917513916
14 WT3171BGAEJ 3171 7238 Lila Levy 145.1337946019459 -37.92898751855743
15 WT3128AQDRS 3128 6609 Sarah Kauffman 145.1295813912443 -37.82078823368618
16 WT3219MZCMM 3219 4928 Charlie Gerber 144.37942394090373 -38.19362930153523
17 WT3170XJVWP 3170 9684 Lucy Lahay 145.17553159514887 -37.936150181976984
18 WT3031DMFGC 3031 6177 Caroline Luckenbach 144.90707048527796 -37.78767901585732
19 WT3015PKLER 3015 8736 Bill Kilbane 144.8979183219914 -37.82580808335247
20 WT3106WQFPR 3106 2374 Mary Bass 145.14274097499288 -37.731835101044354
21 WT3106HTUYW 3106 2374 David Bryan 145.14493956217032 -37.74550312585378
22 WT3352KHBBN 3352 15996 Richard Askew 143.60419898610786 -37.722432808576656
23 WT3079QORWG 3079 5329 Jerry Somogyi 145.05361972090736 -37.76092644646485
24 WT3850WPPZJ 3850 14779 Scott Buggie 146.99670975934802 -38.11120375121315
25 WT3400BOZRI 3400 14543 Tom Davis 142.2056868163526 -36.700923449995635
26 WT3123YZTIF 3123 7160 Paul Earwood 145.05955004240124 -37.82771644759941
27 WT3224OGJJN 3224 1773 Shirley Hall 144.42849521054393 -38.218027859101916
28 WT3137PJCVG 3137 1541 Yolanda Stern 145.32887887734955 -37.830025027117365
29 WT3305NMFYC 3305 3204 Larry Witter 141.29643421841453 -38.11167114301085
30 WT3305KWOFD 3305 3204 Judith Figueroa 141.25644777166127 -38.24079323443777
31 WT3025UXSIE 3025 2430 Willie Laigo 144.79429337101448 -37.82881778367748
32 WT3437KHBPL 3437 3479 Charlotte Green 144.59696365066134 -37.48113208398435
33 WT3151ANFQX 3151 3424 Daniel Davis 145.16632131582105 -37.84908719684687
34 WT3019ASCJP 3019 3065 Charlotte Coutermarsh 144.85492421197495 -37.772589492919515
35 WT3019JIKGX 3019 3065 Vincent January 144.85730316799982 -37.7718018219131
36 WT3764MKCUE 3764 4582 Alejandrina Salazar 144.970506104261 -37.15854276662507
37 WT3730UTUPX 3730 2944 Curtis Johnson 145.8390200963087 -36.01276678240247
38 WT3054SQEQA 3054 8428 Eugene Salano 144.95861592679725 -37.783412869711185
39 WT3620DPAMB 3620 4120 Ben Oneil 144.96824098896346 -36.398921729744224
40 WT3804OQOOF 3804 2023 Jackie Smith 145.35298253700518 -37.98426462189473
41 WT3909HFRJQ 3909 2633 Maria Rhodus 147.90601975805444 -37.764598529015366
42 WT3953SGAEI 3953 1571 Ofelia Kadlec 145.77800174296402 -38.55984015166651
43 WT3953NPQQN 3953 1571 Peter Willer 146.04193592469497 -38.44633595871089
44 WT3765SHSPB 3765 3380 Eilene Horner 145.36201379669092 -37.81894302945288
45 WT3027FZKQC 3027 3323 Angelo Hard 144.73167189283603 -37.85646049026309
46 WT3996ZMYGL 3996 1846 Jennifer Adkins 145.7771574897382 -38.67107249698782
47 WT3498MDTSF 3498 1331 Eleanor Taylor 142.11562298936752 -34.22061676416581
48 WT3498RRAYK 3498 1331 Walter Lemire 142.0934531574623 -34.258337189977496
49 WT3984UBSFJ 3984 1041 Ned Johnson 145.61381415852048 -38.3660140349184
50 WT3227LRSVA 3227 4819 Joan Cox 144.38837299987338 -38.22664848840161
51 WT3950WWFHI 3950 2400 Donald Neil 145.789697571232 -38.44829776894874
52 WT3842LLUAZ 3842 2391 Justin Butcher 146.43738290720543 -38.33409319136186
53 WT3225ZWRKT 3225 1352 Sierra Zelaya 144.63248453729392 -38.273920927385454
54 WT3797JXEYZ 3797 1738 Wade Seay 145.59525777895735 -37.85187937890587
55 WT3980CXZJX 3980 1675 Marianne Gulledge 145.38407991603268 -38.234540388656654
56 WT3862WPONG 3862 1578 Anthony Dawkins 147.33271058732282 -37.491238739170896
57 WT3202IDOPR 3202 1453 Shannon Bello 145.07561474247163 -37.947828524869706
58 WT3304LTOER 3304 681 James Broadway 141.91304296053238 -38.08286392590754
59 WT3478NOSNX 3478 614 Mary Wooster 143.190083774406 -36.70864776402552
60 WT3373ZJBZG 3373 573 Helen Hu 143.40004730403342 -37.327257624451846
61 WT3373FDEUM 3373 573 Phyllis Hegyi 143.19424925274458 -37.38771716562931
62 WT3370XRAHI 3370 356 Tammy Compton 143.76050524940354 -37.17889378247109
63 WT3673HXZDV 3673 346 June Matteson 145.99560167654946 -36.51826050506983
64 WT3943FFEHH 3943 398 Floyd Mcfaul 144.7219219690698 -38.32665967904324
65 WT3937YBAGH 3937 762 Tyesha Evans 145.0385876851752 -38.37262744294901
66 WT3786QKGRU 3786 506 Joe Pulaski 145.33261178176102 -37.876147897332174
67 WT3321FSNXX 3321 759 James Mcintosh 144.00220559674338 -38.10453080180178
68 WT3525YPKBW 3525 433 Denise Roberts 143.32090727836928 -36.14524876420747
69 WT3231VKTTU 3231 418 Karl Evans 143.99174248566703 -38.47241568127852
70 WT3231YSKOO 3231 418 Leontine Mcghee 144.07128861030645 -38.416049306559025
71 WT3766LYICC 3766 619 Gary Evans 145.3953639008541 -37.81880414343826
72 WT3381FUDIA 3381 151 Penny Carrier 142.7602629758581 -37.02897861269415
73 WT3232GSLYH 3232 1114 Joshua Sickafoose 143.96111969797116 -38.544885004427805
74 WT3933UXXXP 3933 549 Shaun Guffey 145.11706009902144 -38.26228415412558
75 WT3701KWYIQ 3701 269 Martha Moore 147.39302957919313 -36.254894160169314
76 WT3701TPSEH 3701 269 Grant Kennedy 147.41241338695838 -36.74234154193107
77 WT3312BCEJQ 3312 1031 Alexandra Ratzlaff 141.38649875710092 -37.85213620536482
78 WT3332VSYVL 3332 338 Charles Koons 144.08742265383532 -37.906318691909874
79 WT3623CXKIC 3623 224 Rebecca Lara 144.90863570166192 -36.44103547317975
80 WT3289ZSWDS 3289 378 Kim Hall 142.1760506248015 -37.83343114690931
81 WT3728YZARW 3728 318 Heather Cummings 145.8168813215635 -36.115027477064245
82 WT3633WGRXB 3633 201 John Miller 145.48023893751045 -36.2875408553956
83 WT3633UVHAO 3633 201 Michael Price 145.51505172180683 -36.31027112244356
84 WT3637KIERO 3637 198 Robert Dow 145.25553090556156 -36.0980796504903
85 WT3063WZIQE 3063 114 James Miller 144.81061694155076 -37.553501843305575
86 WT3334GGKOS 3334 141 Elizabet Benson 144.1621690362788 -37.67891238372265
87 WT3251FUJSG 3251 522 Lisa Voegele 143.5797389397756 -38.1623931117428
88 WT3649NJHAF 3649 86 Catherine Ortiz 145.70444412227315 -36.12591041370753
89 WT3287NEKVB 3287 216 Joel Simmons 142.26305043381535 -37.983480961999916
90 WT3407PYOAR 3407 420 Gale Martin 141.83324586447986 -37.2859635851256
91 WT3779NULEK 3779 197 Aida Kuhnle 146.11080887018696 -37.67951918079387
92 WT3719TVVJM 3719 122 Brent Bautista 145.6864773045679 -37.03188286944955
93 WT3719HLABD 3719 122 Alfred Too 145.52985920519603 -36.964844896202216
94 WT3573DPVGU 3573 111 Wiley Palmer 144.15009214850954 -36.12318035418112
95 WT3254RXAVL 3254 310 Amy Pugh 143.54387071993327 -38.308515316326016
96 WT3832NHOOV 3832 247 Bryan Warren 146.0154412945935 -37.93424551655733
97 WT3238BOTYW 3238 72 Bernard Jackson 143.567776369521 -38.625836774939955
98 WT3238MCUPV 3238 72 Nellie Banks 143.56196753560545 -38.82942446565583
99 WT3375LAJLR 3375 104 Emma Boatwright 143.2980117885972 -37.372200644973155
100 WT3530RJWDT 3530 63 Troy Clark 143.0834668479817 -35.79299394885817
101 WT3596HBEUF 3596 47 Jose Robertson 143.15095468769667 -35.190473662123345

View file

@ -1,3 +1,3 @@
Watchtower ID,Postcode,Population Served,Watchtower Point of Contact Name,x,y Watchtower ID,Postcode,Population Served,Watchtower Point of Contact Name,x,y
WT3953SGAEI,3953,1571,Ofelia Kadlec,145.77800174296402,-38.55984015166651 WT3953SGAEI,3953,1571,Ofelia Kadlec,145.77800174296402,-38.55984015166651
WT3765SHSPB,3765,3380,Eilene Horner,145.36201379669092,-37.81894302945288 WT3765SHSPB,3765,3380,Eilene Horner,145.36201379669092,-37.81894302945288
1 Watchtower ID Postcode Population Served Watchtower Point of Contact Name x y
2 WT3953SGAEI 3953 1571 Ofelia Kadlec 145.77800174296402 -38.55984015166651
3 WT3765SHSPB 3765 3380 Eilene Horner 145.36201379669092 -37.81894302945288

File diff suppressed because it is too large Load diff

312
ed.supp → test/ed.supp Executable file → Normal file
View file

@ -1,156 +1,156 @@
{ {
<insert_a_suppression_name_here> <insert_a_suppression_name_here>
Memcheck:Cond Memcheck:Cond
fun:runtime.adjustframe fun:runtime.adjustframe
fun:runtime.gentraceback fun:runtime.gentraceback
fun:runtime.copystack fun:runtime.copystack
fun:runtime.newstack fun:runtime.newstack
fun:runtime.morestack fun:runtime.morestack
fun:runtime.rt0_go fun:runtime.rt0_go
} }
{ {
<insert_a_suppression_name_here> <insert_a_suppression_name_here>
Memcheck:Cond Memcheck:Cond
fun:runtime.adjustframe fun:runtime.adjustframe
fun:runtime.gentraceback fun:runtime.gentraceback
fun:runtime.copystack fun:runtime.copystack
fun:runtime.newstack fun:runtime.newstack
fun:runtime.morestack fun:runtime.morestack
fun:runtime.rt0_go fun:runtime.rt0_go
} }
{ {
<insert_a_suppression_name_here> <insert_a_suppression_name_here>
Memcheck:Cond Memcheck:Cond
fun:runtime.adjustpointer fun:runtime.adjustpointer
fun:runtime.adjustframe fun:runtime.adjustframe
fun:runtime.gentraceback fun:runtime.gentraceback
fun:runtime.copystack fun:runtime.copystack
fun:runtime.newstack fun:runtime.newstack
fun:runtime.morestack fun:runtime.morestack
fun:runtime.rt0_go fun:runtime.rt0_go
} }
{ {
<insert_a_suppression_name_here> <insert_a_suppression_name_here>
Memcheck:Cond Memcheck:Cond
fun:runtime.adjustpointer fun:runtime.adjustpointer
fun:runtime.adjustframe fun:runtime.adjustframe
fun:runtime.gentraceback fun:runtime.gentraceback
fun:runtime.copystack fun:runtime.copystack
fun:runtime.newstack fun:runtime.newstack
fun:runtime.morestack fun:runtime.morestack
fun:runtime.rt0_go fun:runtime.rt0_go
} }
{ {
<insert_a_suppression_name_here> <insert_a_suppression_name_here>
Memcheck:Leak Memcheck:Leak
match-leak-kinds: possible match-leak-kinds: possible
fun:calloc fun:calloc
fun:_dl_allocate_tls fun:_dl_allocate_tls
fun:pthread_create@@GLIBC_2.2.5 fun:pthread_create@@GLIBC_2.2.5
fun:_cgo_try_pthread_create fun:_cgo_try_pthread_create
fun:x_cgo_sys_thread_create fun:x_cgo_sys_thread_create
fun:_rt0_amd64_lib fun:_rt0_amd64_lib
fun:call_init fun:call_init
fun:_dl_init fun:_dl_init
obj:/usr/lib/ld-2.33.so obj:/usr/lib/ld-2.33.so
obj:* obj:*
obj:* obj:*
obj:* obj:*
} }
{ {
<insert_a_suppression_name_here> <insert_a_suppression_name_here>
Memcheck:Leak Memcheck:Leak
match-leak-kinds: possible match-leak-kinds: possible
fun:calloc fun:calloc
fun:_dl_allocate_tls fun:_dl_allocate_tls
fun:pthread_create@@GLIBC_2.2.5 fun:pthread_create@@GLIBC_2.2.5
fun:_cgo_try_pthread_create fun:_cgo_try_pthread_create
fun:_cgo_sys_thread_start fun:_cgo_sys_thread_start
fun:runtime.asmcgocall fun:runtime.asmcgocall
obj:* obj:*
fun:runtime.newm fun:runtime.newm
fun:runtime.main.func1 fun:runtime.main.func1
fun:runtime.systemstack fun:runtime.systemstack
obj:/mnt/share/ed/libX11.so obj:/mnt/share/ed/libX11.so
} }
{ {
<insert_a_suppression_name_here> <insert_a_suppression_name_here>
Memcheck:Leak Memcheck:Leak
match-leak-kinds: possible match-leak-kinds: possible
fun:calloc fun:calloc
fun:_dl_allocate_tls fun:_dl_allocate_tls
fun:pthread_create@@GLIBC_2.2.5 fun:pthread_create@@GLIBC_2.2.5
fun:_cgo_try_pthread_create fun:_cgo_try_pthread_create
fun:_cgo_sys_thread_start fun:_cgo_sys_thread_start
fun:runtime.asmcgocall fun:runtime.asmcgocall
obj:* obj:*
fun:runtime.newm fun:runtime.newm
fun:runtime.startm fun:runtime.startm
fun:runtime.newproc1 fun:runtime.newproc1
fun:runtime.newproc.func1 fun:runtime.newproc.func1
fun:runtime.systemstack fun:runtime.systemstack
} }
{ {
<insert_a_suppression_name_here> <insert_a_suppression_name_here>
Memcheck:Leak Memcheck:Leak
match-leak-kinds: possible match-leak-kinds: possible
fun:calloc fun:calloc
fun:_dl_allocate_tls fun:_dl_allocate_tls
fun:pthread_create@@GLIBC_2.2.5 fun:pthread_create@@GLIBC_2.2.5
fun:_cgo_try_pthread_create fun:_cgo_try_pthread_create
fun:_cgo_sys_thread_start fun:_cgo_sys_thread_start
fun:runtime.asmcgocall fun:runtime.asmcgocall
obj:* obj:*
fun:runtime.newm fun:runtime.newm
fun:runtime.startm fun:runtime.startm
fun:runtime.handoffp fun:runtime.handoffp
fun:runtime.stoplockedm fun:runtime.stoplockedm
fun:runtime.schedule fun:runtime.schedule
} }
{ {
<insert_a_suppression_name_here> <insert_a_suppression_name_here>
Memcheck:Leak Memcheck:Leak
match-leak-kinds: possible match-leak-kinds: possible
fun:calloc fun:calloc
fun:_dl_allocate_tls fun:_dl_allocate_tls
fun:pthread_create@@GLIBC_2.2.5 fun:pthread_create@@GLIBC_2.2.5
fun:_cgo_try_pthread_create fun:_cgo_try_pthread_create
fun:_cgo_sys_thread_start fun:_cgo_sys_thread_start
fun:runtime.asmcgocall fun:runtime.asmcgocall
obj:* obj:*
fun:runtime.malg.func1 fun:runtime.malg.func1
fun:runtime.systemstack fun:runtime.systemstack
obj:/mnt/share/ed/libX11.so obj:/mnt/share/ed/libX11.so
fun:runtime.rt0_go fun:runtime.rt0_go
} }
{ {
<edstem-suppression> <edstem-suppression>
Memcheck:Leak Memcheck:Leak
match-leak-kinds: possible match-leak-kinds: possible
fun:calloc fun:calloc
fun:_dl_allocate_tls fun:_dl_allocate_tls
fun:pthread_create@@GLIBC_2.2.5 fun:pthread_create@@GLIBC_2.2.5
fun:_cgo_try_pthread_create fun:_cgo_try_pthread_create
fun:x_cgo_sys_thread_create fun:x_cgo_sys_thread_create
fun:_rt0_amd64_lib fun:_rt0_amd64_lib
fun:call_init fun:call_init
fun:_dl_init fun:_dl_init
obj:/usr/lib/ld-2.33.so obj:/usr/lib/ld-2.33.so
} }
{ {
<insert_a_suppression_name_here> <insert_a_suppression_name_here>
Memcheck:Leak Memcheck:Leak
match-leak-kinds: possible match-leak-kinds: possible
fun:calloc fun:calloc
fun:_dl_allocate_tls fun:_dl_allocate_tls
fun:pthread_create@@GLIBC_2.2.5 fun:pthread_create@@GLIBC_2.2.5
fun:_cgo_try_pthread_create fun:_cgo_try_pthread_create
fun:_cgo_sys_thread_start fun:_cgo_sys_thread_start
fun:runtime.asmcgocall fun:runtime.asmcgocall
obj:* obj:*
obj:* obj:*
obj:* obj:*
obj:* obj:*
obj:* obj:*
obj:* obj:*
} }

BIN
voronoi.o

Binary file not shown.

BIN
voronoi1

Binary file not shown.