This is a pre-release version (2.0.0.dev0+git20260907.41eeb59).Go to latest (1.18.0)
{ } Raw JSON

bundles / scipy 2.0.0.dev0+git20260907.41eeb59 / scipy / optimize / _shgo_lib / _complex / Complex

class

scipy.optimize._shgo_lib._complex:Complex

source: build-install/usr/lib/python3.14/site-packages/scipy/optimize/_shgo_lib/_complex.py:13

Signature

class Complex(dim, domain = None, sfield = None, sfield_args = (), symmetry = None, constraints = None, workers = 1)

Members

Summary

Base class for a simplicial complex described as a cache of vertices together with their connections.

Extended Summary

Important methods:

Domain triangulation:

Complex.triangulate, Complex.split_generation

Triangulating arbitrary points (must be traingulable,

may exist outside domain):

Complex.triangulate(sample_set)

Converting another simplicial complex structure data type to the

structure used in Complex (ex. OBJ wavefront)

Complex.convert(datatype, data)

Important objects:

HC.V: The cache of vertices and their connection HC.H: Storage structure of all vertex groups

Parameters

dim : int

Spatial dimensionality of the complex R^dim

domain : list of tuples, optional

The bounds [x_l, x_u]^dim of the hyperrectangle space ex. The default domain is the hyperrectangle [0, 1]^dim Note: The domain must be convex, non-convex spaces can be cut away from this domain using the non-linear g_cons functions to define any arbitrary domain (these domains may also be disconnected from each other)

sfield

A scalar function defined in the associated domain f: R^dim --> R

sfield_args : tuple

Additional arguments to be passed to sfield

vfield
vfield_args : tuple

Additional arguments to be passed to vfield

symmetry : None or list

Specify if the objective function contains symmetric variables. The search space (and therefore performance) is decreased by up to O(n!) times in the fully symmetric case.

E.g. f(x) = (x_1 + x_2 + x_3) + (x_4)**2 + (x_5)**2 + (x_6)**2

In this equation x_2 and x_3 are symmetric to x_1, while x_5 and

x_6 are symmetric to x_4, this can be specified to the solver as:

symmetry = [0, # Variable 1

0, # symmetric to variable 1 0, # symmetric to variable 1 3, # Variable 4 3, # symmetric to variable 4 3, # symmetric to variable 4 ]

constraints : dict or sequence of dict, optional

Constraints definition. Function(s) R**n in the form

g(x) <= 0 applied as g : R^n -> R^m
h(x) == 0 applied as h : R^n -> R^p

Each constraint is defined in a dictionary with fields:

type

Constraint type: 'eq' for equality, 'ineq' for inequality.

fun

The function defining the constraint.

jac

The Jacobian of fun (only for SLSQP).

args

Extra arguments to be passed to the function and Jacobian.

Equality constraint means that the constraint function result is to be zero whereas inequality means that it is to be non-negative.constraints : dict or sequence of dict, optional Constraints definition. Function(s) R**n in the form

g(x) <= 0 applied as g : R^n -> R^m
h(x) == 0 applied as h : R^n -> R^p

Each constraint is defined in a dictionary with fields:

type

Constraint type: 'eq' for equality, 'ineq' for inequality.

fun

The function defining the constraint.

jac

The Jacobian of fun (unused).

args

Extra arguments to be passed to the function and Jacobian.

Equality constraint means that the constraint function result is to be zero whereas inequality means that it is to be non-negative.

workers : int optional

Uses multiprocessing.Pool <multiprocessing>) to compute the field

functions in parallel.

Aliases

  • scipy.optimize._shgo.Complex