Procedures

ProcedureLocationProcedure TypeDescription
char_array_to_int aoc_utilities Function

Character array to integer routine

char_to_int aoc_utilities Function

Basic string to integer routine

char_to_int64 aoc_utilities Function

Basic string to integer(ip) routine. Hacky hack just so we can overload as int()

clock_end aoc_utilities Subroutine

Print runtime in milliseconds form the start of the clock.

clock_start aoc_utilities Subroutine

Start the clock

close_file aoc_utilities Subroutine
cross aoc_utilities Function

Cross product of two real 3x1 vectors

diff aoc_utilities Function

Difference ip vector

expand_vector aoc_utilities Subroutine

Add elements to the integer vector in chunks.

file_t aoc_utilities Interface
get_indices aoc_utilities Interface

to get all the indices in a 2d array that match a value

get_indices_in_char_array aoc_utilities Subroutine

return the indices of all the val elements in 2d array.

get_indices_in_int_array aoc_utilities Subroutine

return the indices of all the val elements in 2d array.

hex2int aoc_utilities Function
int aoc_utilities Interface
int_array_to_char_array aoc_utilities Function

integer array to Character array

int_to_str aoc_utilities Function

integer to string

int_to_string aoc_utilities Function

integer to string

inverse aoc_utilities Subroutine

inverse of a 2x2 matrix.

Read more…
is_not_number aoc_utilities Function

returns true if the character is not a number.

is_number aoc_utilities Function

returns true if the character is a number from 0 to 9.

lcm aoc_utilities Function

LCM. based on code from NCAR Command Language

locpt aoc_utilities Subroutine

given a polygonal line connecting the vertices (x(i),y(i)) (i = 1,...,n) taken in this order. it is assumed that the polygonal path is a loop, where (x(n),y(n)) = (x(1),y(1)) or there is an arc from (x(n),y(n)) to (x(1),y(1)).

Read more…
manhatten_distance aoc_utilities Interface
manhatten_distance_64 aoc_utilities Function

Manhattan distance between two ip points.

n_lines aoc_utilities Function
num_digits aoc_utilities Function

return the number of digits in the integer

number_of_lines_in_file aoc_utilities Function

Returns the number of lines in a file (assumed to be open)

open_file aoc_utilities Function
parea aoc_utilities Function

given a sequence of nb points (x(i),y(i)). parea computes the area bounded by the closed polygonal curve which passes through the points in the order that they are indexed. the final point of the curve is assumed to be the first point given. therefore, it need not be listed at the end of x and y. the curve is not required to be simple.

Read more…
parse aoc_utilities Interface
parse_ints aoc_utilities Function

parse positive ints from a string that also includes text

parse_ints64 aoc_utilities Function

Parse positive ints from a string that also includes text

parse_nums64 aoc_utilities Function

parse space-deliminated ip sequence (positive or negative)

read_file_to_char_array aoc_utilities Function

Read a file into a 2d character array.

read_file_to_int_array aoc_utilities Function

Read a file into a 2d int array. Uses the '(*(I1))' format.

read_file_to_int_vec aoc_utilities Function

read a file that is single string of ints into a vector

read_file_to_integer64_array aoc_utilities Function

Read a file into an ip integer array (one element per line)

read_file_to_integer_array aoc_utilities Function

Read a file into an integer array (one element per line)

read_file_to_string aoc_utilities Function
read_line aoc_utilities Function

Reads the next line from a file.

read_line_from_file aoc_utilities Function
reverse aoc_utilities Function

Reverse an ip vector

sort aoc_utilities Interface
sort_ascending aoc_utilities Subroutine

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

sort_ascending_64 aoc_utilities Subroutine
split aoc_utilities Interface
split1 aoc_utilities Function

Split a character string using a token. This routine is inspired by the Python split function.

Read more…
split2 aoc_utilities Function

Split a string, given a token.

startswith aoc_utilities Interface

test if a string starts with a specified substring

startswith_cc aoc_utilities Function

starts with function for strings

startswith_cs aoc_utilities Function
startswith_sc aoc_utilities Function
startswith_ss aoc_utilities Function
str_to_array aoc_utilities Function

convert the character string to an array of characters

str_to_int64 aoc_utilities Interface
str_to_int64_array_with_mapping aoc_utilities Function

Convert a string to a numeric array by mapping characters to integers (user-specified)

str_to_int_array_with_mapping aoc_utilities Function

Convert a string to a numeric array by mapping characters to integers (user-specified)

string_to_int aoc_utilities Function

Basic string to integer routine

string_to_int_64 aoc_utilities Function

Basic string to integer routine

swap aoc_utilities Interface
swap32 aoc_utilities Subroutine

Swap two integer values.

swap64 aoc_utilities Subroutine

Swap two integer values.

swap_str aoc_utilities Subroutine

Swap two character string values

unique aoc_utilities Interface
unique32 aoc_utilities Function

Return only the unique values from vec.

unique64 aoc_utilities Function

Return only the unique values from vec.

call~~graph~~CallGraph interface~file_t file_t proc~open_file open_file interface~file_t->proc~open_file interface~get_indices get_indices proc~get_indices_in_char_array get_indices_in_char_array interface~get_indices->proc~get_indices_in_char_array proc~get_indices_in_int_array get_indices_in_int_array interface~get_indices->proc~get_indices_in_int_array interface~int int proc~char_array_to_int char_array_to_int interface~int->proc~char_array_to_int proc~char_to_int char_to_int interface~int->proc~char_to_int proc~char_to_int64 char_to_int64 interface~int->proc~char_to_int64 proc~string_to_int string%string_to_int interface~int->proc~string_to_int interface~manhatten_distance manhatten_distance proc~manhatten_distance_64 manhatten_distance_64 interface~manhatten_distance->proc~manhatten_distance_64 interface~parse parse proc~parse_nums64 parse_nums64 interface~parse->proc~parse_nums64 interface~sort sort proc~sort_ascending sort_ascending interface~sort->proc~sort_ascending proc~sort_ascending_64 sort_ascending_64 interface~sort->proc~sort_ascending_64 interface~split split proc~split1 split1 interface~split->proc~split1 proc~split2 split2 interface~split->proc~split2 interface~startswith startswith proc~startswith_cc startswith_cc interface~startswith->proc~startswith_cc proc~startswith_cs startswith_cs interface~startswith->proc~startswith_cs proc~startswith_sc startswith_sc interface~startswith->proc~startswith_sc proc~startswith_ss startswith_ss interface~startswith->proc~startswith_ss interface~str_to_int64 str_to_int64 proc~string_to_int_64 string%string_to_int_64 interface~str_to_int64->proc~string_to_int_64 interface~swap swap proc~swap32 swap32 interface~swap->proc~swap32 proc~swap64 swap64 interface~swap->proc~swap64 proc~swap_str swap_str interface~swap->proc~swap_str interface~unique unique proc~unique32 unique32 interface~unique->proc~unique32 proc~unique64 unique64 interface~unique->proc~unique64 proc~char_array_to_int->proc~char_to_int proc~clock_end clock%clock_end proc~clock_start clock%clock_start proc~close_file close_file proc~cross cross proc~diff diff proc~expand_vector expand_vector proc~hex2int hex2int proc~int_array_to_char_array int_array_to_char_array proc~int_to_str int_to_str proc~int_to_string int_to_string proc~inverse inverse proc~is_not_number is_not_number proc~is_number is_number proc~is_not_number->proc~is_number proc~lcm lcm proc~locpt locpt proc~n_lines file_t%n_lines proc~number_of_lines_in_file number_of_lines_in_file proc~n_lines->proc~number_of_lines_in_file proc~num_digits num_digits float float proc~num_digits->float proc~parea parea proc~parse_ints parse_ints proc~parse_ints64 parse_ints64 proc~parse_nums64->interface~split proc~read_file_to_char_array read_file_to_char_array proc~read_file_to_char_array->proc~number_of_lines_in_file proc~read_line read_line proc~read_file_to_char_array->proc~read_line proc~read_file_to_int_array read_file_to_int_array proc~read_file_to_int_array->proc~number_of_lines_in_file proc~read_file_to_int_array->proc~read_line proc~read_file_to_int_vec read_file_to_int_vec proc~read_file_to_int_vec->proc~read_line proc~read_file_to_integer64_array read_file_to_integer64_array proc~read_file_to_integer64_array->proc~number_of_lines_in_file proc~read_file_to_integer_array read_file_to_integer_array proc~read_file_to_integer_array->proc~number_of_lines_in_file proc~read_file_to_string read_file_to_string proc~read_line_from_file file_t%read_line_from_file proc~read_line_from_file->proc~read_line proc~reverse reverse proc~sort_ascending->interface~swap proc~sort_ascending_64->proc~swap64 proc~split1->proc~expand_vector proc~split2->proc~split1 proc~startswith_cs->interface~startswith proc~startswith_sc->interface~startswith proc~startswith_ss->interface~startswith proc~str_to_array str_to_array proc~str_to_int64_array_with_mapping str_to_int64_array_with_mapping proc~str_to_int_array_with_mapping str_to_int_array_with_mapping proc~unique32->interface~sort proc~unique64->interface~sort
Help