Skip to content

clinaresl/libpdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Introduction

libpdb provides means for creating Pattern Databases in different permutation state spaces. In particular, it assumes that either full or partial states are represented with a vector of integers which are all different. Eligible domains are the N-Pancake, the sliding-tile puzzle or the TopSpin.

It supports both MAX and ADD pattern databases.

Dependencies

Tests have been created using the Google Test Framework which is necessary for both compiling and runing the tests, see below.designed using

Build

To download the code type the following:

    $ git clone https://github.com/clinaresl/libpdb.git

To compile the source code, create first the Makefile with:

    $ cmake . -DCMAKE_BUILD_TYPE=Release
    $ make

from the libpdb/ directory created after the clone. It will build the library, and a generator for every domain defined under domains/, and all the unit tests.

It is also possible to compile separately different parts of the whole bundle. To compile only the library do:

   $ make libpdb

which generates the shared library src/libpdb.so

To generate an executable to solve instances in a specific domain use make domain where domain can be any of the following: npancake or npuzzle.

Install

To install the library in your filesystem, e.g., under /usr/local:

    $ cmake . -DCMAKE_INSTALL_PREFIX=/usr/local

Next, build it with:

    $ cmake --build .

and finally install the files in your filesystem (presumably with sudo if the target directory requires root access):

    $ cmake --install .

Tests

This library comes with a number of unit tests that have been implemented with Google Test. If Google Test is available in your computer, then you can compile and run the tests with:

    $ make gtest
    $ tests/gtest

from the libpdb/ directory created after the clone.

License

MIT License

Copyright (c) 2025, Carlos Linares López

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Authors

Carlos Linares Lopez carlos.linares@uc3m.es
Computer Science and Engineering Department https://www.inf.uc3m.es/en
Universidad Carlos III de Madrid https://www.uc3m.es/home

About

This library provides means for creating Pattern Databases in different domains

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published