class_docstr: Barrier optimization problem:
      minimize fun(x) - barrier_parameter*sum(log(s))
      subject to: constr_eq(x)     = 0
                constr_ineq(x) + s = 0
docstr: Returns barrier function and constraints at given point.
  
  For z = [x, s], returns barrier function:
      function(z) = fun(x) - barrier_parameter*sum(log(s))
  and barrier constraints:
      constraints(z) = [   constr_eq(x)     ]
                       [ constr_ineq(x) + s ]
docstr_tok: ["Returns","barrier","function","and","constraints","at","given","point",".","For","z","=","[","x",",","s","]",",","returns","barrier","function",":","function","(","z",")","=","fun","(","x",")","-","barrier_parameter","*","sum","(","log","(","s",")",")","and","barrier","constraints",":","constraints","(","z",")","=","[","constr_eq","(","x",")","]","[","constr_ineq","(","x",")","+","s","]"]
code: def function_and_constraints(self, z):
      """Returns barrier function and constraints at given point.
  
      For z = [x, s], returns barrier function:
          function(z) = fun(x) - barrier_parameter*sum(log(s))
      and barrier constraints:
          constraints(z) = [   constr_eq(x)     ]
                           [ constr_ineq(x) + s ]
  
      """
      # Get variables and slack variables
      x = self.get_variables(z)
      s = self.get_slack(z)
      # Compute function and constraints
      f = self.fun(x)
      c_eq, c_ineq = self.constr(x)
      # Return objective function and constraints
      return (
          self._compute_function(f, c_ineq, s),
          self._compute_constr(c_ineq, c_eq, s),
      )
  
imports: import scipy.sparse
  import numpy
  from .equality_constrained_sqp import equality_constrained_sqp
  from scipy.sparse.linalg import LinearOperator
label_desc: Use image node_id 5 for calling the BarrierSubproblem obj's underlying member method code with example usage: obj.function_and_constraints(z) and returns: self,  self