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 full type name 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()

intin(x[, log_uniform])

Samples a value.

floatin(x, log_uniform)

Samples a value.

distribute_integer_randomly(n, m[, min_per_bin])

Distributes an integer n over a list of m values randomly, with each value at least one.

generate_random_weights(n)

Generates a list of n random weights between 0 and 1 that sum to 1.

jit([nopython])

Classes

PathLike()

Abstract base class for implementing the file system path protocol.

ReturnCause(value[, names, module, ...])

TimeoutError

Timeout expired.

TimeoutCaller()

Class Inheritance Diagram

Inheritance diagram of negmas.helpers.types.ReturnCause, negmas.helpers.timeout.TimeoutCaller