YAC 3.21.0
Yet Another Coupler
Loading...
Searching...
No Matches
src.core.InterpMethodConfig Class Reference

User-oriented wrapper around a YAC interpolation method configuration. More...

Collaboration diagram for src.core.InterpMethodConfig:
Collaboration graph

Public Member Functions

 __init__ (self, str method_name, **kwargs)
 
 __del__ (self)
 
 set_param_str (self, str path, str value)
 Set a parameter by dot-separated path from a string value.
 
 set_param_int (self, str path, int value)
 Set a scalar integer parameter by dot-separated path.
 
 set_param_dble (self, str path, float value)
 Set a scalar double parameter by dot-separated path.
 
 set_param (self, str path, str|int|float|dict|list value)
 Set a parameter by dot-separated path, dispatching on type.
 
int get_param_int (self, str path)
 Get the integer value of a parameter by dot-separated path.
 
float get_param_dble (self, str path)
 Get the double value of a parameter by dot-separated path.
 
str get_param_str (self, str path)
 Get the string value of a parameter by dot-separated path.
 
int get_list_size (self, str path)
 Return the number of elements in the list parameter at path.
 
int append_list_element (self, str path)
 Append a default element to the list parameter at path.
 

Protected Attributes

 _ptr
 

Detailed Description

User-oriented wrapper around a YAC interpolation method configuration.

Typical usage::

cfg = InterpMethodConfig("nnn")
cfg.set_param_int("n", 8)
cfg.set_param_str("weighted", "gauss_weighted")
stack = InterpolationStack()
stack.add_from_config(cfg)

Definition at line 1084 of file core.pyx.

Constructor & Destructor Documentation

◆ __init__()

src.core.InterpMethodConfig.__init__ ( self,
str method_name,
** kwargs )

Definition at line 1097 of file core.pyx.

◆ __del__()

src.core.InterpMethodConfig.__del__ ( self)

Definition at line 1105 of file core.pyx.

Here is the call graph for this function:

Member Function Documentation

◆ append_list_element()

int src.core.InterpMethodConfig.append_list_element ( self,
str path )

Append a default element to the list parameter at path.

Returns the zero-based index of the newly appended element so that its sub-parameters can be set with paths like "listname.<index>.subparam".

Definition at line 1175 of file core.pyx.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_list_size()

int src.core.InterpMethodConfig.get_list_size ( self,
str path )

Return the number of elements in the list parameter at path.

Definition at line 1169 of file core.pyx.

Here is the call graph for this function:

◆ get_param_dble()

float src.core.InterpMethodConfig.get_param_dble ( self,
str path )

Get the double value of a parameter by dot-separated path.

Definition at line 1153 of file core.pyx.

Here is the call graph for this function:

◆ get_param_int()

int src.core.InterpMethodConfig.get_param_int ( self,
str path )

Get the integer value of a parameter by dot-separated path.

Definition at line 1147 of file core.pyx.

Here is the call graph for this function:

◆ get_param_str()

str src.core.InterpMethodConfig.get_param_str ( self,
str path )

Get the string value of a parameter by dot-separated path.

Definition at line 1159 of file core.pyx.

Here is the call graph for this function:

◆ set_param()

src.core.InterpMethodConfig.set_param ( self,
str path,
str | int | float | dict | list value )

Set a parameter by dot-separated path, dispatching on type.

Definition at line 1129 of file core.pyx.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_param_dble()

src.core.InterpMethodConfig.set_param_dble ( self,
str path,
float value )

Set a scalar double parameter by dot-separated path.

Definition at line 1123 of file core.pyx.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_param_int()

src.core.InterpMethodConfig.set_param_int ( self,
str path,
int value )

Set a scalar integer parameter by dot-separated path.

Definition at line 1117 of file core.pyx.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_param_str()

src.core.InterpMethodConfig.set_param_str ( self,
str path,
str value )

Set a parameter by dot-separated path from a string value.

Definition at line 1111 of file core.pyx.

Here is the call graph for this function:
Here is the caller graph for this function:

Field Documentation

◆ _ptr

src.core.InterpMethodConfig._ptr
protected

Definition at line 1100 of file core.pyx.


The documentation for this class was generated from the following file: