diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 1ac13da..91aded8 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.9.4","generation_timestamp":"2024-10-18T13:01:01","documenter_version":"1.7.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.9.4","generation_timestamp":"2024-10-18T13:21:20","documenter_version":"1.7.0"}} \ No newline at end of file diff --git a/dev/api/index.html b/dev/api/index.html index 4b42e2f..e46519d 100644 --- a/dev/api/index.html +++ b/dev/api/index.html @@ -1,5 +1,5 @@ -API · QUBOLib.jl

API

Actions

Path Routing

QUBOLib.database_pathFunction
database_path(path::AbstractString=library_path())::AbstractString

Returns the absolute path to the database file, given a reference library path path.

source
QUBOLib.archive_pathFunction
archive_path(path::AbstractString=library_path())::AbstractString

Returns the absolute path to the archive file, given a reference library path path.

source
QUBOLib.root_pathFunction
root_path()::AbstractString

Returns the absolute path to the project's root folder.

Info

The dist_path, build_path, and cache_path functions are more often used when building the library, therefore they will point to the the project's root path by default, by referencing this function.

source
QUBOLib.dist_pathFunction
dist_path(path::AbstractString=root_path())::AbstractString

Returns the absolute path to the distribution folder, given a reference root path path.

source
QUBOLib.build_pathFunction
build_path(path::AbstractString=root_path())::AbstractString

Returns the absolute path to the build folder, given a reference root path path.

source
QUBOLib.cache_pathFunction
cache_path(path::AbstractString=root_path())::AbstractString

Returns the absolute path to the cache folder, given a reference root path path.

source

Library Index

QUBOLib.LibraryIndexType
LibraryIndex

The QUBOLib index is composed of two pieces: a SQLite database and an HDF5 archive.

source
QUBOLib.databaseFunction
database(index::LibraryIndex)::SQLite.DB

Returns a pointer that grants direct access to the SQLite database of the library index.

source
QUBOLib.archiveFunction
archive(index::LibraryIndex)::HDF5.File

Returns a pointer that grants direct access to the HDF5 archive of the library index.

source

Data Access

QUBOLib.accessFunction
access(
+API · QUBOLib.jl

API

Actions

Path Routing

QUBOLib.database_pathFunction
database_path(path::AbstractString=library_path())::AbstractString

Returns the absolute path to the database file, given a reference library path path.

source
QUBOLib.archive_pathFunction
archive_path(path::AbstractString=library_path())::AbstractString

Returns the absolute path to the archive file, given a reference library path path.

source
QUBOLib.root_pathFunction
root_path()::AbstractString

Returns the absolute path to the project's root folder.

Info

The dist_path, build_path, and cache_path functions are more often used when building the library, therefore they will point to the the project's root path by default, by referencing this function.

source
QUBOLib.dist_pathFunction
dist_path(path::AbstractString=root_path())::AbstractString

Returns the absolute path to the distribution folder, given a reference root path path.

source
QUBOLib.build_pathFunction
build_path(path::AbstractString=root_path())::AbstractString

Returns the absolute path to the build folder, given a reference root path path.

source
QUBOLib.cache_pathFunction
cache_path(path::AbstractString=root_path())::AbstractString

Returns the absolute path to the cache folder, given a reference root path path.

source

Library Index

QUBOLib.LibraryIndexType
LibraryIndex

The QUBOLib index is composed of two pieces: a SQLite database and an HDF5 archive.

source
QUBOLib.databaseFunction
database(index::LibraryIndex)::SQLite.DB

Returns a pointer that grants direct access to the SQLite database of the library index.

source
QUBOLib.archiveFunction
archive(index::LibraryIndex)::HDF5.File

Returns a pointer that grants direct access to the HDF5 archive of the library index.

source

Data Access

QUBOLib.accessFunction
access(
     callback;
     path::Union{AbstractString,Nothing} = nothing,
     create::Bool = false
@@ -7,6 +7,6 @@
 
 QUBOLib.access() do index
     print(index) # Show some information about the index
-end
source
QUBOLib.load_solutionFunction
load_solution(index::LibraryIndex, solution::Integer)
-load_solution(index::LibraryIndex, instance::Integer, solution::Integer)
source

Data Management

QUBOLib.add_collection!Function
add_collection!(index::LibraryIndex, code::Symbol, data::Dict{String,Any})

Creates a new collection in the library index.

source
QUBOLib.add_instance!Function
add_instance!(index::LibraryIndex, coll::Symbol, model::QUBOTools.Model{Int,Float64,Int})

Adds a new instance to the library index.

source
QUBOLib.add_solution!Function
add_solution!(index::LibraryIndex, instance::Integer, solution::SampleSet{Float64,Int})

Registers a new solution for a given instance.

The solution argument is a QUBOTools.SampleSet, which is a collection of samples and their respective energies.

source
QUBOLib.add_solver!Function
add_solver!(index::LibraryIndex, code::Symbol, data::Dict{String,Any})

Registers a new solver in the library index.

source
QUBOLib.remove_instance!Function
remove_instance!(index::LibraryIndex, coll::Symbol, instance::Integer)

Removes an instance from the library index.

source
QUBOLib.remove_solution!Function
remove_solution!(index::LibraryIndex, instance::Integer, solution::Integer)

Removes a solution from the library index.

source

Instance Synthesis

Problem Types

QUBOLib.Synthesis.WishartType
Wishart{T}(n::Integer, m::Integer)

Represents the Wishart model on $n$ variables whose $\mathbf{W}$ matrix has $m$ columns.

When true, the discretize keyword limits the entries of the $\mathbf{R}$ matrix to $\pm 1$. The precision, on the other hand, is the amount of digits to round each entry $R_{i,j}$ after sampling from a normal distribution $\mathcal{N}(0, 1)$.

source
QUBOLib.Synthesis.SherringtonKirkpatrickType
SherringtonKirkpatrick{T}(n::Integer, μ::T, σ::T)

Generates a Sherrington-Kirkpatrick model in $n$ variables. Coefficients are normally distributed with mean $\mu$ and variance $\sigma$.

source
+end
source
QUBOLib.load_solutionFunction
load_solution(index::LibraryIndex, solution::Integer)
+load_solution(index::LibraryIndex, instance::Integer, solution::Integer)
source

Data Management

QUBOLib.add_collection!Function
add_collection!(index::LibraryIndex, code::Symbol, data::Dict{String,Any})

Creates a new collection in the library index.

source
QUBOLib.add_instance!Function
add_instance!(index::LibraryIndex, coll::Symbol, model::QUBOTools.Model{Int,Float64,Int})

Adds a new instance to the library index.

source
QUBOLib.add_solution!Function
add_solution!(index::LibraryIndex, instance::Integer, solution::SampleSet{Float64,Int})

Registers a new solution for a given instance.

The solution argument is a QUBOTools.SampleSet, which is a collection of samples and their respective energies.

source
QUBOLib.add_solver!Function
add_solver!(index::LibraryIndex, code::Symbol, data::Dict{String,Any})

Registers a new solver in the library index.

source
QUBOLib.remove_instance!Function
remove_instance!(index::LibraryIndex, coll::Symbol, instance::Integer)

Removes an instance from the library index.

source
QUBOLib.remove_solution!Function
remove_solution!(index::LibraryIndex, instance::Integer, solution::Integer)

Removes a solution from the library index.

source

Instance Synthesis

Problem Types

QUBOLib.Synthesis.WishartType
Wishart{T}(n::Integer, m::Integer)

Represents the Wishart model on $n$ variables whose $\mathbf{W}$ matrix has $m$ columns.

When true, the discretize keyword limits the entries of the $\mathbf{R}$ matrix to $\pm 1$. The precision, on the other hand, is the amount of digits to round each entry $R_{i,j}$ after sampling from a normal distribution $\mathcal{N}(0, 1)$.

source
QUBOLib.Synthesis.SherringtonKirkpatrickType
SherringtonKirkpatrick{T}(n::Integer, μ::T, σ::T)

Generates a Sherrington-Kirkpatrick model in $n$ variables. Coefficients are normally distributed with mean $\mu$ and variance $\sigma$.

source
diff --git a/dev/booklet/0-intro/index.html b/dev/booklet/0-intro/index.html index 11bb0af..071bf12 100644 --- a/dev/booklet/0-intro/index.html +++ b/dev/booklet/0-intro/index.html @@ -1,2 +1,2 @@ -- · QUBOLib.jl
+- · QUBOLib.jl
diff --git a/dev/booklet/1-design/index.html b/dev/booklet/1-design/index.html index 43e43ab..c03ef6f 100644 --- a/dev/booklet/1-design/index.html +++ b/dev/booklet/1-design/index.html @@ -1,2 +1,2 @@ -Database Design · QUBOLib.jl

Database Design

In this section we discuss the decisions and specifications behind the construction of the database.

Models and Solutions

The HDF5 file format is used to store the data. The data is stored in a hierarchical structure, which is a natural fit for the data. The data is stored in a tree-like structure, with the root group being the top level. The root group contains the following groups:

  • instances: Contains the instances of the data.
  • solutions: Contains the solutions to the instances.

Collections

One of the core ideas behind QUBOLib is to deploy other QUBO instance libraries in a bundle.

+Database Design · QUBOLib.jl

Database Design

In this section we discuss the decisions and specifications behind the construction of the database.

Models and Solutions

The HDF5 file format is used to store the data. The data is stored in a hierarchical structure, which is a natural fit for the data. The data is stored in a tree-like structure, with the root group being the top level. The root group contains the following groups:

  • instances: Contains the instances of the data.
  • solutions: Contains the solutions to the instances.

Collections

One of the core ideas behind QUBOLib is to deploy other QUBO instance libraries in a bundle.

diff --git a/dev/booklet/2-build/index.html b/dev/booklet/2-build/index.html index a50d570..b078788 100644 --- a/dev/booklet/2-build/index.html +++ b/dev/booklet/2-build/index.html @@ -11,4 +11,4 @@ └── data qubolib ├── archive.h5 -└── index.db +└── index.db diff --git a/dev/index.html b/dev/index.html index 0c40775..72e0c26 100644 --- a/dev/index.html +++ b/dev/index.html @@ -3,4 +3,4 @@ Pkg.add(url="https://github.com/JuliaQUBO/QUBOLib.jl") -using QUBOLib +using QUBOLib diff --git a/dev/manual/0-intro/index.html b/dev/manual/0-intro/index.html index 5c47f1c..4891058 100644 --- a/dev/manual/0-intro/index.html +++ b/dev/manual/0-intro/index.html @@ -3,4 +3,4 @@ \displaystyle \min_{\mathbf{x}} & \alpha \left[ \mathbf{x}' \mathbf{Q} \, \mathbf{x} + \mathbf{\ell}' \mathbf{x} + \beta \right] \\ \textrm{s.t.} & \mathbf{x} \in \mathbb{B}^{n} \\ -\end{array}\]

where $\mathbf{Q} \in \mathbb{R}^{n \times n}$ is an upper triangular matrix, $\mathbf{\ell} \in \mathbb{R}^{n}$ is a vector, $\alpha, \beta \in \mathbb{R}$ are scalars, and $\mathbb{B}^{n}$ is the set of binary vectors of length $n$.

Table of Contents

  1. Basic Usage
+\end{array}\]

where $\mathbf{Q} \in \mathbb{R}^{n \times n}$ is an upper triangular matrix, $\mathbf{\ell} \in \mathbb{R}^{n}$ is a vector, $\alpha, \beta \in \mathbb{R}$ are scalars, and $\mathbb{B}^{n}$ is the set of binary vectors of length $n$.

Table of Contents

  1. Basic Usage
diff --git a/dev/manual/1-basic/index.html b/dev/manual/1-basic/index.html index 0195466..75ec548 100644 --- a/dev/manual/1-basic/index.html +++ b/dev/manual/1-basic/index.html @@ -3,4 +3,4 @@ QUBOLib.access() do index print(index) -end +end diff --git a/dev/manual/2-advanced/index.html b/dev/manual/2-advanced/index.html index 1c96275..118bb3c 100644 --- a/dev/manual/2-advanced/index.html +++ b/dev/manual/2-advanced/index.html @@ -4,4 +4,4 @@ QUBOLib.access() do index db = QUBOLib.database(index) h5 = QUBOLib.archive(index) -end +end