setup

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const CppHeaderFilename string = "gurobi/gurobi_passthrough.h"
View Source
const GoLibraryFilename string = "gurobi/cgoHelper.go"

Constants

Variables

This section is empty.

Functions

func CreateCXXFlagsDirective

func CreateCXXFlagsDirective(sf SetupFlags) (string, error)

CreateCXXFlagsDirective Description:

Creates the CXX Flags directive in the  file that we will use in lib.go.

func CreateGurobiHomeDirectory

func CreateGurobiHomeDirectory(versionInfo GurobiVersionInfo) (string, error)

CreateGurobiHomeDirectory Description:

Creates the Gurobi Home directory where your gurobi program and helper files should be installed when you run
the Gurobi Installer.

func CreateLDFlagsDirective

func CreateLDFlagsDirective(sf SetupFlags) (string, error)

CreateLDFlagsDirective Description:

Creates the LD_FLAGS directive in the file that we will use in lib.go.

func CreatePackageLine

func CreatePackageLine(sf SetupFlags) (string, error)

CreatePackageLine Description:

Creates the "package" directive in the  file that we will use in lib.go.

func WriteHeaderFile

func WriteHeaderFile(sf SetupFlags) error

WriteHeaderFile Description:

This script writes the C++ header file which goes in gurobi.go but references
the true gurobi_c.h file.

func WriteLibGo

func WriteLibGo(sf SetupFlags) error

WriteLibGo Description:

Creates the library file which imports the proper libraries for cgo.
By default this is named according to GoLibraryFilename.

Types

type GurobiVersionInfo

type GurobiVersionInfo struct {
	MajorVersion    int
	MinorVersion    int
	TertiaryVersion int
}

func FindHighestVersion

func FindHighestVersion(gurobiVersionList []GurobiVersionInfo) (GurobiVersionInfo, error)

// Iterate through all versions in gurobiVersionList and find the one with the largest major or minor version.

func StringToGurobiVersionInfo

func StringToGurobiVersionInfo(gurobiDirectoryName string) (GurobiVersionInfo, error)

StringToGurobiVersionInfo Assumptions:

Assumes that a valid gurobi name is given.

func StringsToGurobiVersionInfoList

func StringsToGurobiVersionInfoList(gurobiDirectoryNames []string) ([]GurobiVersionInfo, error)

StringsToGurobiVersionInfoList Description:

Receives a set of strings which should be in the format of valid gurobi installation directories
and returns a list of GurobiVersionInfo objects.

Assumptions:

Assumes that a valid gurobi name is given.

func (GurobiVersionInfo) GreaterThan

func (gvi GurobiVersionInfo) GreaterThan(gviComp GurobiVersionInfo) bool

type SetupFlags

type SetupFlags struct {
	GurobiHome     string // Directory where Gurobi is installed
	GoFilename     string // Name of the Go File to
	HeaderFilename string // Name of the Headerfile to Create
	PackageName    string // Name of the package
}

func GetDefaultSetupFlags

func GetDefaultSetupFlags() (SetupFlags, error)

func ParseMakeLibArguments

func ParseMakeLibArguments(sfIn SetupFlags) (SetupFlags, error)

func (*SetupFlags) ToGurobiVersionInfo

func (mlf *SetupFlags) ToGurobiVersionInfo() (GurobiVersionInfo, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL