Skip to content

GabrielHalvonik/ProcessingOfElectionResults_DataStructures

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

ProcessingOfElectionResults is semester project for the school subject Data Structures and Algorithms.
The aim of the work was to process a large amount of data, efficiently read, filter and sort.
The application uses only its own implemented data structures, sorting and filtering.
Qt Framework (v5.15) was used for better visualization and usability.

User manual

The main application window is the TableWidget.
If we click on the table header, a dialog box for selecting filtering will appear. We can filter by one criterion, or specify a range.
Double-click to sort the table according to the selected column.
After pressing the SPACE key, the table is filtered according to the currently selected filter(s). If no filter is selected, the original unfiltered / unsorted table is displayed.

Table

Data reading

Data are read from four files (uzemne_jednotky.csv, vysledky_hlasovania_okrsky.csv, politicke_subjekty.csv, hlas_pre_subjekty.csv).
For this purpose, I generalized a class for retrieving data from the CSV format with different numbers of columns of different types using "variadic templates".
  • Universal data loader declaration: DataLoaderDecl
  • Universal data loader implementation: DataLoaderImpl
  • Universal data loader usage: DataLoaderUsage

Criterion:

  • select the properties of individual objects.
  • UML diagram of Criterion classes CriterionUML

Filter:

  • cooperates with the criterion, takes over the set of elements, and uses the criterion to select those that suit it and returns them.

  • UML diagram of Filter classes CriterionUML

  • As you can see in the photo, filters can be combined using the overloaded operators and, or, not. FilterUsage

Sorting

  • For sorting, app uses the QuickSort algorithm (O(n*log(n)) - O (n^2)).
  • Although the complexity of this algorithm can go as far as n^2, this behavior is very rare and in most cases very fast.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published