Procedures

ProcedureLocationProcedure TypeDescription
clear_exceptions numerical_differentiation_module Subroutine

Clear all exceptions.

columns_in_partition_group numerical_differentiation_module Subroutine

Returns the columns in a sparsity partition group.

Read more…
compute_function_with_cache numerical_differentiation_module Subroutine

Wrapper for computing the function, using the cache.

compute_indices numerical_differentiation_module Subroutine

Computes the indices vector in the class.

compute_jacobian numerical_differentiation_module Subroutine

Compute the Jacobian.

Read more…
compute_jacobian_dense numerical_differentiation_module Subroutine

just a wrapper for compute_jacobian, that returns a dense (m x n) matrix.

Read more…
compute_jacobian_for_sparsity numerical_differentiation_module Subroutine

A separate version of compute_jacobian to be used only when computing the sparsity pattern in compute_sparsity_random_2. It uses class_meths and the sparsity dperts and bounds.

Read more…
compute_jacobian_partitioned numerical_differentiation_module Subroutine

Compute the Jacobian using finite differences, (using the partitioned sparsity pattern to compute multiple columns at a time).

compute_jacobian_standard numerical_differentiation_module Subroutine

Compute the Jacobian using finite differences. (one column at a time)

compute_jacobian_times_vector numerical_differentiation_module Subroutine

Returns the product J*v, where J is the m x n Jacobian matrix and v is an n x 1 vector.

Read more…
compute_jacobian_with_diff numerical_differentiation_module Subroutine

Compute the Jacobian one element at a time using the Neville's process algorithm diff. This takes a very large number of function evaluations, but should give a very accurate answer.

compute_perturb_vector numerical_differentiation_module Subroutine

Compute dx, the perturbation vector for x

compute_perturbation_vector numerical_differentiation_module Subroutine

Compute dx, the perturbation vector for x used when computing the gradients.

compute_sparsity_dense numerical_differentiation_module Subroutine

assume all elements of Jacobian are non-zero.

compute_sparsity_pattern numerical_differentiation_module Subroutine

Computes the sparsity pattern and return it. Uses the settings currently in the class.

compute_sparsity_perturbation_vector numerical_differentiation_module Subroutine

Compute dx, the perturbation vector for x used when computing the sparsity pattern.

compute_sparsity_random numerical_differentiation_module Subroutine

Compute the sparsity pattern by computing the function at three "random" points in the [xlow_for_sparsity, xhigh_for_sparsity] interval and checking if the function values are the same.

compute_sparsity_random_2 numerical_differentiation_module Subroutine

Compute the sparsity pattern by computing a 2-point jacobian at a specified number of "random" points (num_sparsity_points) in the [xlow_for_sparsity, xhigh_for_sparsity] interval and checking if they are the same.

degr dsm_module Subroutine

Given the sparsity pattern of an m by n matrix a, this subroutine determines the degree sequence for the intersection graph of the columns of a.

Read more…
destroy_cache numdiff_cache_module Subroutine

Destroy a cache.

destroy_numdiff_type numerical_differentiation_module Subroutine

destroy the numdiff_type class.

destroy_sparsity numerical_differentiation_module Subroutine

destroy a sparsity_pattern type.

destroy_sparsity_pattern numerical_differentiation_module Subroutine

Destroy the sparsity pattern in the class.

diff diff_module Subroutine

the procedure diff calculates the first, second or third order derivative of a function by using neville's process to extrapolate from a sequence of simple polynomial approximations based on interpolating points distributed symmetrically about x0 (or lying only on one side of x0 should this be necessary). if the specified tolerance is non-zero then the procedure attempts to satisfy this absolute or relative accuracy requirement, while if it is unsuccessful or if the tolerance is set to zero then the result having the minimum achievable estimated error is returned instead.

divide_interval numdiff_utilities_module Function

Returns a set of slightly randomized equally-spaced points that divide an interval.

Read more…
dsm dsm_module Subroutine

The purpose of dsm is to determine an optimal or near- optimal consistent partition of the columns of a sparse m by n matrix a.

Read more…
dsm_wrapper numerical_differentiation_module Subroutine

Wrapper for dsm to compute the sparsity pattern partition.

equal_within_tol numdiff_utilities_module Function

Returns true if the values in the array are the same (to within the specified absolute tolerance).

expand_vector numdiff_utilities_module Interface
expand_vector_int numdiff_utilities_module Subroutine

Add elements to the integer vector in chunks.

expand_vector_real numdiff_utilities_module Subroutine

Add elements to the real vector in chunks.

faccur diff_module Subroutine

This procedure attempts to estimate the level of rounding errors in the calculated function values near the point x0+h0 by fitting a least-squares straight-line approximation to the function at the six points x0+h0-j*h1, (j = 0,1,3,5,7,9), and then setting facc to twice the largest deviation of the function values from this line. hi is adjusted if necessary so that it is approximately 8 times the smallest spacing at which the function values are unequal near x0+h0.

failed numerical_differentiation_module Function

Returns True if an exception has been raised.

fdjs dsm_module Subroutine

Given a consistent partition of the columns of an m by n jacobian matrix into groups, this subroutine computes approximations to those columns in a given group. the approximations are stored into either a column-oriented or a row-oriented pattern.

Read more…
finite_diff_method numerical_differentiation_module Interface

constructor

generate_dense_sparsity_partition numerical_differentiation_module Subroutine

Generate a "dense" sparsity partition.

get_all_methods_in_class numerical_differentiation_module Function

Returns all the methods with the given class (i.e., number of points in the formula).

get_error_status numerical_differentiation_module Subroutine

Returns the current error code and message.

get_finite_diff_formula numerical_differentiation_module Subroutine

Return a string with the finite difference formula. Input is the method id code.

Read more…
get_finite_difference_method numerical_differentiation_module Subroutine

Return a finite_diff_method given the id code. (the id codes begin at 1, are sequential, and uniquely define the method).

Read more…
get_formula numerical_differentiation_module Subroutine

Return a string with the finite difference formula.

Read more…
get_from_cache numdiff_cache_module Subroutine

Check if the x vector is in the cache, if so return f. Note that only some of the elements may be present, so it will return the ones there are there, and indicate which ones were found.

get_sparsity_pattern numerical_differentiation_module Subroutine

Returns the sparsity pattern from the class. If it hasn't been computed, the output arrays will not be allocated.

ido dsm_module Subroutine

given the sparsity pattern of an m by n matrix a, this subroutine determines an incidence-degree ordering of the columns of a.

Read more…
initialize_cache numdiff_cache_module Subroutine

Initialize the cache. Must be called first before use.

initialize_finite_difference_method numerical_differentiation_module Function

Constructor for a finite_diff_method.

Read more…
initialize_numdiff numerical_differentiation_module Subroutine

Initialize a numdiff_type class. This must be called first.

Read more…
initialize_numdiff_for_diff numerical_differentiation_module Subroutine

Alternate version of initialize_numdiff routine when using diff to compute the Jacobian.

integer_to_string numerical_differentiation_module Function

Convert an integer to a string.

numsrt dsm_module Subroutine

Given a sequence of integers, this subroutine groups together those indices with the same sequence value and, optionally, sorts the sequence into either ascending or descending order.

Read more…
perturb_x_and_compute_f numerical_differentiation_module Subroutine

Perturb the specified optimization variable, and compute the function. This routine is designed so that df is accumulated as each function evaluation is done, to avoid having to allocate more temporary storage.

perturb_x_and_compute_f_partitioned numerical_differentiation_module Subroutine

Perturb the specified optimization variable, and compute the function. This routine is designed so that df is accumulated as each function evaluation is done, to avoid having to allocate more temporary storage.

print_cache numdiff_cache_module Subroutine

Print the contents of the cache. Used for debugging.

print_finite_difference_method numerical_differentiation_module Subroutine

Print the contents of a finite_diff_method. Used for debugging.

print_sparsity numerical_differentiation_module Subroutine

Print the sparsity pattern.

print_sparsity_matrix numerical_differentiation_module Subroutine

Print the sparsity pattern in matrix form.

print_sparsity_pattern numerical_differentiation_module Subroutine

Print the sparsity pattern in vector form (irow, icol).

put_in_cache numdiff_cache_module Subroutine

Put a value into the cache.

raise_exception numerical_differentiation_module Subroutine

Raise an exception.

resize_sparsity_vectors numerical_differentiation_module Subroutine

Resize the sparsity arrays after accumulating them.

select_finite_diff_method numerical_differentiation_module Subroutine

Select a finite diff method of a given class so that the perturbations of x will not violate the variable bounds.

select_finite_diff_method_for_partition_group numerical_differentiation_module Subroutine

Select a finite diff method of a given class so that the perturbations of x will not violate the variable bounds for any variable in the group.

Read more…
seq dsm_module Subroutine

given the sparsity pattern of an m by n matrix a, this subroutine determines a consistent partition of the columns of a by a sequential algorithm.

Read more…
set_dpert numerical_differentiation_module Subroutine

Change the dpert vector. Can be used after the class has been initialized to change the perturbation step sizes (e.g., after an iteration).

set_function diff_module Subroutine

Set the function in a diff_func. Must be called before diff.

set_numdiff_bounds numerical_differentiation_module Subroutine

Change the variable bounds in a numdiff_type.

Read more…
set_numdiff_sparsity_bounds numerical_differentiation_module Subroutine

Sets the variable bounds for sparsity in a numdiff_type. These are only used for sparsity_mode=2.

Read more…
set_sparsity_mode numerical_differentiation_module Subroutine

Set sparsity mode.

set_sparsity_pattern numerical_differentiation_module Subroutine

To specify the sparsity pattern directly if it is already known.

Read more…
setr dsm_module Subroutine

given a column-oriented definition of the sparsity pattern of an m by n matrix a, this subroutine determines a row-oriented definition of the sparsity pattern of a.

Read more…
slo dsm_module Subroutine

given the sparsity pattern of an m by n matrix a, this subroutine determines the smallest-last ordering of the columns of a.

Read more…
sort_ascending numdiff_utilities_module Interface
sort_ascending_int numdiff_utilities_module Subroutine

Sorts an integer array ivec in increasing order. Uses a basic recursive quicksort (with insertion sort for partitions with 20 elements).

sort_ascending_real numdiff_utilities_module Subroutine

Sorts a real array ivec in increasing order. Uses a basic recursive quicksort (with insertion sort for partitions with 20 elements).

srtdat dsm_module Subroutine

given the non-zero elements of an m by n matrix a in arbitrary order as specified by their row and column indices, this subroutine permutes these elements so that their column indices are in non-decreasing order.

Read more…
swap numdiff_utilities_module Interface
swap_int numdiff_utilities_module Subroutine

Swap two integer values.

swap_real numdiff_utilities_module Subroutine

Swap two integer values.

terminate diff_module Subroutine

Can be called by the user in the function to terminate the computation. This will set ifail=-1.

terminate numerical_differentiation_module Subroutine

A user-callable routine. When called, it will terminate all computations and return. The istat return code will be set to -1. This can be called in the function or the info function.

unique numdiff_utilities_module Interface
unique_int numdiff_utilities_module Function

Returns only the unique elements of the vector (sorted in ascending order).

unique_real numdiff_utilities_module Function

Returns only the unique elements of the vector (sorted in ascending order).

vector_djb_hash numdiff_cache_module Function

DJB hash algorithm for a real(wp) vector.

Read more…
call~~graph~~CallGraph interface~expand_vector expand_vector proc~expand_vector_int expand_vector_int interface~expand_vector->proc~expand_vector_int proc~expand_vector_real expand_vector_real interface~expand_vector->proc~expand_vector_real interface~finite_diff_method finite_diff_method proc~initialize_finite_difference_method initialize_finite_difference_method interface~finite_diff_method->proc~initialize_finite_difference_method interface~sort_ascending sort_ascending proc~sort_ascending_int sort_ascending_int interface~sort_ascending->proc~sort_ascending_int proc~sort_ascending_real sort_ascending_real interface~sort_ascending->proc~sort_ascending_real interface~swap swap proc~swap_int swap_int interface~swap->proc~swap_int proc~swap_real swap_real interface~swap->proc~swap_real interface~unique unique proc~unique_int unique_int interface~unique->proc~unique_int proc~unique_real unique_real interface~unique->proc~unique_real proc~clear_exceptions numdiff_type%clear_exceptions proc~columns_in_partition_group sparsity_pattern%columns_in_partition_group proc~compute_function_with_cache compute_function_with_cache proc~get_from_cache function_cache%get_from_cache proc~compute_function_with_cache->proc~get_from_cache proc~put_in_cache function_cache%put_in_cache proc~compute_function_with_cache->proc~put_in_cache proc~compute_indices sparsity_pattern%compute_indices proc~compute_jacobian numdiff_type%compute_jacobian proc~compute_perturbation_vector numdiff_type%compute_perturbation_vector proc~compute_jacobian->proc~compute_perturbation_vector proc~raise_exception numdiff_type%raise_exception proc~compute_jacobian->proc~raise_exception proc~compute_jacobian_dense numdiff_type%compute_jacobian_dense proc~compute_jacobian_dense->proc~compute_jacobian proc~compute_jacobian_for_sparsity numdiff_type%compute_jacobian_for_sparsity proc~compute_sparsity_perturbation_vector numdiff_type%compute_sparsity_perturbation_vector proc~compute_jacobian_for_sparsity->proc~compute_sparsity_perturbation_vector proc~perturb_x_and_compute_f numdiff_type%perturb_x_and_compute_f proc~compute_jacobian_for_sparsity->proc~perturb_x_and_compute_f proc~select_finite_diff_method numdiff_type%select_finite_diff_method proc~compute_jacobian_for_sparsity->proc~select_finite_diff_method proc~compute_jacobian_partitioned compute_jacobian_partitioned proc~compute_jacobian_partitioned->proc~columns_in_partition_group proc~perturb_x_and_compute_f_partitioned numdiff_type%perturb_x_and_compute_f_partitioned proc~compute_jacobian_partitioned->proc~perturb_x_and_compute_f_partitioned proc~compute_jacobian_partitioned->proc~raise_exception proc~select_finite_diff_method_for_partition_group numdiff_type%select_finite_diff_method_for_partition_group proc~compute_jacobian_partitioned->proc~select_finite_diff_method_for_partition_group proc~compute_jacobian_standard compute_jacobian_standard proc~compute_jacobian_standard->proc~perturb_x_and_compute_f proc~compute_jacobian_standard->proc~raise_exception proc~compute_jacobian_standard->proc~select_finite_diff_method proc~compute_jacobian_times_vector numdiff_type%compute_jacobian_times_vector proc~compute_jacobian_times_vector->proc~compute_jacobian proc~compute_jacobian_with_diff compute_jacobian_with_diff proc~diff diff_func%diff proc~compute_jacobian_with_diff->proc~diff proc~compute_jacobian_with_diff->proc~raise_exception proc~set_function diff_func%set_function proc~compute_jacobian_with_diff->proc~set_function proc~compute_perturb_vector numdiff_type%compute_perturb_vector proc~compute_perturb_vector->proc~raise_exception proc~compute_perturbation_vector->proc~compute_perturb_vector proc~compute_sparsity_dense compute_sparsity_dense proc~compute_sparsity_dense->proc~compute_indices proc~destroy_sparsity_pattern numdiff_type%destroy_sparsity_pattern proc~compute_sparsity_dense->proc~destroy_sparsity_pattern proc~generate_dense_sparsity_partition numdiff_type%generate_dense_sparsity_partition proc~compute_sparsity_dense->proc~generate_dense_sparsity_partition proc~compute_sparsity_pattern numdiff_type%compute_sparsity_pattern proc~get_sparsity_pattern numdiff_type%get_sparsity_pattern proc~compute_sparsity_pattern->proc~get_sparsity_pattern proc~compute_sparsity_perturbation_vector->proc~compute_perturb_vector proc~compute_sparsity_random compute_sparsity_random proc~compute_sparsity_random->interface~expand_vector proc~compute_sparsity_random->proc~compute_indices proc~compute_sparsity_random->proc~destroy_sparsity_pattern proc~dsm_wrapper sparsity_pattern%dsm_wrapper proc~compute_sparsity_random->proc~dsm_wrapper proc~equal_within_tol equal_within_tol proc~compute_sparsity_random->proc~equal_within_tol proc~compute_sparsity_random->proc~raise_exception proc~resize_sparsity_vectors numdiff_type%resize_sparsity_vectors proc~compute_sparsity_random->proc~resize_sparsity_vectors proc~compute_sparsity_random_2 compute_sparsity_random_2 proc~compute_sparsity_random_2->interface~expand_vector proc~compute_sparsity_random_2->proc~compute_indices proc~compute_sparsity_random_2->proc~compute_jacobian_for_sparsity proc~compute_sparsity_random_2->proc~destroy_sparsity_pattern proc~divide_interval divide_interval proc~compute_sparsity_random_2->proc~divide_interval proc~compute_sparsity_random_2->proc~dsm_wrapper proc~compute_sparsity_random_2->proc~equal_within_tol proc~compute_sparsity_random_2->proc~generate_dense_sparsity_partition proc~get_all_methods_in_class get_all_methods_in_class proc~compute_sparsity_random_2->proc~get_all_methods_in_class proc~compute_sparsity_random_2->proc~raise_exception proc~compute_sparsity_random_2->proc~resize_sparsity_vectors proc~degr degr proc~destroy_cache function_cache%destroy_cache proc~destroy_numdiff_type numdiff_type%destroy_numdiff_type proc~destroy_sparsity sparsity_pattern%destroy_sparsity proc~destroy_sparsity_pattern->proc~destroy_sparsity proc~faccur diff_func%faccur proc~diff->proc~faccur proc~divide_interval->interface~unique proc~dsm dsm proc~dsm->proc~degr proc~ido ido proc~dsm->proc~ido proc~numsrt numsrt proc~dsm->proc~numsrt proc~seq seq proc~dsm->proc~seq proc~setr setr proc~dsm->proc~setr proc~slo slo proc~dsm->proc~slo proc~srtdat srtdat proc~dsm->proc~srtdat proc~dsm_wrapper->proc~dsm proc~failed numdiff_type%failed proc~fdjs fdjs proc~get_finite_difference_method get_finite_difference_method proc~get_all_methods_in_class->proc~get_finite_difference_method proc~get_error_status numdiff_type%get_error_status proc~get_finite_diff_formula get_finite_diff_formula proc~get_finite_diff_formula->proc~get_finite_difference_method proc~get_formula finite_diff_method%get_formula proc~get_finite_diff_formula->proc~get_formula proc~integer_to_string integer_to_string proc~get_formula->proc~integer_to_string proc~vector_djb_hash vector_djb_hash proc~get_from_cache->proc~vector_djb_hash proc~ido->proc~numsrt proc~initialize_cache function_cache%initialize_cache proc~initialize_cache->proc~destroy_cache proc~initialize_numdiff numdiff_type%initialize_numdiff proc~initialize_numdiff->proc~destroy_cache proc~initialize_numdiff->proc~get_all_methods_in_class proc~initialize_numdiff->proc~get_finite_difference_method proc~initialize_numdiff->proc~initialize_cache proc~initialize_numdiff->proc~raise_exception proc~set_numdiff_bounds numdiff_type%set_numdiff_bounds proc~initialize_numdiff->proc~set_numdiff_bounds proc~set_sparsity_mode numdiff_type%set_sparsity_mode proc~initialize_numdiff->proc~set_sparsity_mode proc~initialize_numdiff_for_diff numdiff_type%initialize_numdiff_for_diff proc~initialize_numdiff_for_diff->proc~destroy_cache proc~initialize_numdiff_for_diff->proc~initialize_cache proc~initialize_numdiff_for_diff->proc~raise_exception proc~initialize_numdiff_for_diff->proc~set_numdiff_bounds proc~initialize_numdiff_for_diff->proc~set_sparsity_mode proc~print_cache function_cache%print_cache proc~print_finite_difference_method finite_diff_method%print_finite_difference_method proc~print_sparsity sparsity_pattern%print_sparsity proc~print_sparsity_matrix numdiff_type%print_sparsity_matrix proc~print_sparsity_pattern numdiff_type%print_sparsity_pattern proc~put_in_cache->interface~unique proc~resize_sparsity_vectors->interface~expand_vector proc~set_dpert numdiff_type%set_dpert proc~set_dpert->proc~raise_exception proc~set_numdiff_bounds->proc~integer_to_string proc~set_numdiff_bounds->proc~raise_exception proc~set_numdiff_sparsity_bounds numdiff_type%set_numdiff_sparsity_bounds proc~set_numdiff_sparsity_bounds->proc~raise_exception proc~set_sparsity_mode->proc~raise_exception proc~set_sparsity_mode->proc~set_numdiff_sparsity_bounds proc~set_sparsity_pattern numdiff_type%set_sparsity_pattern proc~set_sparsity_pattern->proc~compute_indices proc~set_sparsity_pattern->proc~destroy_sparsity_pattern proc~set_sparsity_pattern->proc~dsm_wrapper proc~set_sparsity_pattern->proc~raise_exception proc~sort_ascending_int->interface~swap proc~sort_ascending_real->interface~swap proc~terminate diff_func%terminate proc~terminate~2 numdiff_type%terminate proc~unique_int->interface~expand_vector proc~unique_int->interface~sort_ascending proc~unique_real->interface~expand_vector proc~unique_real->interface~sort_ascending
Help