negmas.helpers Package

Helper modueles

Functions

get_class(class_name[, module_name, scope, ...])

Imports and creates a class object for the given class name

import_by_name(full_name)

Imports something form a module using its full name

get_full_type_name(t)

Gets the ful typename of a type.

instantiate(class_name[, module_name, scope])

Imports and instantiates an object of a class

is_jsonable(x)

is_lambda_function(obj)

Checks if the given object is a lambda function

is_partial_function(obj)

Checks if the given object is a lambda function

is_lambda_or_partial_function(obj)

Checks if the given object is a lambda function or a partial function

is_type(obj)

Checks if the given object is a type converted to string

is_not_lambda_nor_partial_function(obj)

Checks if the given object is not a lambda function

shortest_unique_names(strs[, sep, ...])

Finds the shortest unique strings starting from the end of each input string based on the separator.

snake_case(s)

Converts a string from CamelCase to snake_case

camel_case(s[, capitalize_first, lower_first])

Converts a string from snake_case to CamelCase

unique_name(base[, add_time, add_host, ...])

Return a unique name.

pretty_string(src[, tab_size, compact])

Recursively print nested elements.

exception2str([limit, chain])

rtype:

str

humanize_time(secs[, align, ...])

Prints time that is given as seconds in human readable form.

shorten(name[, length, common_parts])

Returns a short version of the name.

create_loggers([file_name, module_name, ...])

Create a set of loggers to report feedback.

force_single_thread([on])

Forces negmas to use a single thread for all internal calls.

single_thread()

monotonic_minmax(input, f)

Finds the limits of a function f for the input assuming that it is monotonic and input has min_value and max_value members

monotonic_multi_minmax(input, f)

Finds the limits of a function f for the input assuming that it is monotonic and each input has min_value and max_value members

nonmonotonic_multi_minmax(input, f)

Finds the limits of a function f for each input assuming that it is non-monotonic and input is iterable

nonmonotonic_minmax(input, f)

Finds the limits of a function f for the input assuming that it is non-monotonic and input is iterable

make_callable(x)

Converts its input to a callable (i.e. can be called using () operator).

get_free_tcp_port()

jit([nopython])

Classes

PathLike()

Abstract base class for implementing the file system path protocol.

ReturnCause(value)

An enumeration.

TimeoutError

The operation exceeded the given deadline.

TimeoutCaller()

Class Inheritance Diagram

digraph inheritance1db07573f1 { bgcolor=transparent; fontsize=11; randkir=TB; rankdir=LR; size=""; "Enum" [URL="https://docs.python.org/3/library/enum.html#enum.Enum",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Generic enumeration."]; "ReturnCause" [URL="../api/negmas.helpers.ReturnCause.html#negmas.helpers.ReturnCause",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="An enumeration."]; "Enum" -> "ReturnCause" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TimeoutCaller" [URL="../api/negmas.helpers.TimeoutCaller.html#negmas.helpers.TimeoutCaller",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=11,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top"]; }