Skip to content

JuliaQUBO/QUBOLib.jl

Repository files navigation

QUBOLib.jl

Getting Started

Installation

julia> import Pkg; Pkg.add(url="https://github.com/JuliaQUBO/QUBOLib.jl")

julia> using QUBOLib

Example

julia> using QUBOLib

julia> QUBOLib.access() do index
           println(index)
       end

Accessing the instance index database

Warning This requires SQLite.jl and DataFrames.jl to be installed.

julia> using QUBOLib

julia> using SQLite, DataFrames

julia> models = QUBOLib.access() do index
           df = DBInterface.execute(
               QUBOLib.database(index),
               "SELECT instance FROM Instances WHERE size BETWEEN 100 AND 200;"
           ) |> DataFrame

           return [QUBOLib.load_instance(index, i) for i in df[!, :instance]]
       end

Listing Collections

julia> QUBOLib.access() do index
           DBInterface.execute(
               QUBOLib.database(index),
               "SELECT * FROM Collections;"
           ) |> DataFrame
       end