Welcome to the Search Algorithms Suite and the B+ Tree Complexity Tester! This project includes tools and methods for key searching and B+ tree performance evaluation.
SearchMethodsDemo
demonstrates various key searching methods using file indexes. It includes implementations for:
- Random Search
- Unsorted File Index Search
- Sorted File Index Search
- Class:
RandomSearch
- Package:
org.tuc.randomSearch
- Description: Implements a basic random search strategy to locate a key in a dataset.
-
Class:
UnsortedFileIndexSearch
-
Package:
org.tuc.unsortedFileIndexSearch
-
Description: Provides methods for searching using unsorted file indexes.
searchGivenPage(targetKey, dataPage, stringLength, dataPairFile)
: Searches for a key within a specific data page.searchInUnsortedFile(targetKey, unsortedFile)
: Searches for a key in an unsorted file index.
-
Class:
SortedFileIndexSearch
-
Package:
org.tuc.sortedFileIndexSearch
-
Description: Methods for binary and data page searches on a sorted file.
binarySearch(key, sortedFile)
: Performs a binary search on a sorted file.searchDataPage(targetKey, dataPage, stringLength, dataPairFile)
: Searches for a key within a specific data page of a data pair file.
The B+ Tree Complexity Tester assesses the efficiency of a B+ tree for indexing words from textual data across multiple files. It includes:
- A robust B+ tree implementation
- File reading capabilities
- Linked list storage for word occurrences
- B+ Tree Implementation: Efficiently manages word occurrences.
- File Reading: Extracts words and builds a B+ tree.
- Linked List Storage: Associates words with file and position information using linked lists.
To build and run the projects, follow these steps:
-
Clone the Repository:
git clone https://github.com/YourUsername/YourRepository.git cd YourRepository
-
Install Dependencies:
Ensure you have
make
andjavac
(Java compiler) installed on your system. -
Build the Projects:
-
Build Project 1 (
SearchMethodsDemo
):make project1
This command compiles the Java source files and packages them into
project1.jar
located in thebuild
directory. -
Build Project 2 (
B+ Tree Complexity Tester
):make project2
This command compiles the Java source files, prepares the necessary files (
1.txt
,2.txt
), and packages everything intoproject2.jar
located in thebuild
directory.
-
-
Run the Program:
-
For
SearchMethodsDemo
:java -jar project1.jar
-
For
B+ Tree Complexity Tester
:java -jar project2.jar
Ensure that any required input files are in the same directory as the JAR file when running the program.
-
Contributions to both projects are encouraged! To contribute:
- Fork the repository.
- Create a new branch for your feature or fix.
- Implement your changes and commit them.
- Push your changes to your fork.
- Submit a pull request with a description of your modifications.
Ensure your contributions adhere to the project's coding standards and include clear documentation.
Both projects are licensed under the GNU General Public License. For detailed licensing information, please refer to the LICENSE file in the repository.
For any questions or support, please open an issue on the GitHub repository or contact the maintainers.
Thank you for using and contributing to these projects!