SYMBOL INDEX (2152 symbols across 254 files) FILE: advent-of-code/2021/day01/src/main.rs function main (line 3) | fn main() { function numbers (line 8) | fn numbers() -> Vec { function first (line 16) | fn first() -> usize { function second (line 20) | fn second() -> usize { FILE: advent-of-code/2021/day02/src/main.rs type Direction (line 3) | enum Direction { function main (line 11) | fn main() { function directions (line 16) | fn directions() -> Vec { function first (line 33) | fn first() -> i64 { function second (line 48) | fn second() -> i64 { FILE: advent-of-code/2021/day03/src/main.rs function main (line 3) | fn main() { function input (line 8) | fn input() -> Vec { function ones (line 16) | fn ones(numbers: &Vec) -> Vec { function decimal (line 29) | fn decimal(digits: &Vec) -> usize { function first (line 37) | fn first() -> usize { function filter (line 50) | fn filter(numbers: Vec, position: usize, f: F) -> Vec function iterate (line 63) | fn iterate(numbers: &Vec, f: F) -> usize function second (line 81) | fn second() -> usize { FILE: advent-of-code/2021/day04/src/main.rs type Cell (line 3) | struct Cell { type Board (line 8) | struct Board { method iter (line 14) | fn iter(&self) -> impl Iterator { method iter_mut (line 18) | fn iter_mut(&mut self) -> impl Iterator { method mark (line 22) | fn mark(&mut self, number: i64) { method is_winning (line 28) | fn is_winning(&self) -> bool { method unmarked_sum (line 33) | fn unmarked_sum(&self) -> i64 { function parse_input (line 38) | fn parse_input() -> (Vec, Vec) { function main (line 72) | fn main() { FILE: advent-of-code/2021/day05/src/main.rs type Point (line 5) | struct Point { type Line (line 11) | struct Line { method is_diagonal (line 49) | fn is_diagonal(&self) -> bool { method points (line 53) | fn points(&self) -> Vec { function parse_input (line 16) | fn parse_input() -> Vec { function range (line 40) | fn range(a: i64, b: i64) -> Box> { function intersections (line 71) | fn intersections<'a>(lines: impl Iterator) -> usize { function main (line 82) | fn main() { FILE: advent-of-code/2021/day06/src/main.rs function parse_input (line 3) | fn parse_input() -> Vec { function iterate (line 8) | fn iterate(numbers: &[usize; 9], iterations: usize) -> usize { function main (line 23) | fn main() { FILE: advent-of-code/2021/day07/src/main.rs function parse_input (line 3) | fn parse_input() -> Vec { function main (line 11) | fn main() { FILE: advent-of-code/2021/day08/src/main.rs type InputLine (line 4) | struct InputLine { function parse_input (line 9) | fn parse_input() -> Vec { function bits (line 24) | fn bits(n: u8) -> u32 { function bitset (line 28) | fn bitset<'a>(number: &'a str) -> u8 { function consume (line 36) | fn consume(patterns: &mut Vec, f: F) -> u8 function decrypt (line 43) | fn decrypt(line: &InputLine) -> usize { function main (line 65) | fn main() { FILE: advent-of-code/2021/day09/src/main.rs function parse_input (line 3) | fn parse_input() -> Vec> { function low_points (line 19) | fn low_points(map: &Vec>) -> Vec<(usize, usize)> { function fill (line 40) | fn fill(map: &mut Vec>, point: (usize, usize)) -> usize { function main (line 65) | fn main() { FILE: advent-of-code/2021/day10/src/main.rs function score (line 3) | fn score(input: &str) -> (usize, usize) { function main (line 29) | fn main() { FILE: advent-of-code/2021/day11/src/main.rs type Board (line 3) | type Board = Vec>; function advance (line 5) | fn advance(board: &mut Board, h: usize, w: usize) -> usize { function first (line 40) | fn first(board: &Board, h: usize, w: usize) -> usize { function second (line 51) | fn second(board: &Board, h: usize, w: usize) -> usize { function main (line 66) | fn main() { FILE: advent-of-code/2021/day12/src/main.rs type Graph (line 3) | type Graph<'a> = HashMap<&'a str, Vec<&'a str>>; function is_small (line 5) | fn is_small(cave: &str) -> bool { function parse_input (line 9) | fn parse_input(text: &str) -> Graph { function paths (line 24) | fn paths(graph: &Graph) -> (usize, usize) { function main (line 59) | fn main() { FILE: advent-of-code/2021/day13/src/main.rs type Point (line 3) | type Point = (usize, usize); type Fold (line 4) | type Fold = (char, usize); function parse_input (line 6) | fn parse_input() -> (HashSet, Vec) { function fold (line 38) | fn fold(points: HashSet, fold: Fold) -> HashSet { function draw (line 52) | fn draw(points: &HashSet) { function main (line 68) | fn main() { FILE: advent-of-code/2021/day14/src/main.rs type Pair (line 3) | type Pair = (u8, u8); type RuleSet (line 4) | type RuleSet = HashMap; type Histogram (line 5) | type Histogram = HashMap; function expand (line 7) | fn expand(pairs: Histogram, rules: &RuleSet) -> Histogram { function parse_input (line 23) | fn parse_input() -> (String, RuleSet) { function histogram (line 43) | fn histogram(polymer: &str) -> Histogram { function solve (line 55) | fn solve(polymer: &str, rules: &RuleSet, iterations: usize) -> usize { function main (line 78) | fn main() { FILE: advent-of-code/2021/day15/src/main.rs function parse_input (line 7) | fn parse_input() -> Vec> { function adjancent (line 20) | fn adjancent(x: usize, y: usize, h: usize, w: usize) -> Vec<(usize, usiz... function five_expand (line 39) | fn five_expand(grid: &Vec>) -> Vec> { function lowest_risk (line 55) | fn lowest_risk(grid: &Vec>) -> i64 { function main (line 81) | fn main() { FILE: advent-of-code/2021/day16/src/main.rs type Bit (line 21) | type Bit = u8; type LiteralValue (line 22) | type LiteralValue = u64; type Version (line 23) | type Version = u8; type TypeId (line 24) | type TypeId = u8; type Result (line 25) | type Result = i64; type Packet (line 28) | enum Packet { function bits (line 33) | fn bits(char: u8) -> [Bit; 4] { function read_number (line 50) | fn read_number(stream: &mut I, size: usize) -> N function read_literal (line 60) | fn read_literal(stream: &mut I) -> LiteralValue function read_packet (line 81) | fn read_packet(mut stream: &mut dyn Iterator, eval: fn(Pa... function eval (line 109) | fn eval(packet: Packet) -> Result { function stream_input (line 125) | fn stream_input() -> impl Iterator { function main (line 134) | fn main() { FILE: advent-of-code/2021/day17/src/main.rs function parse_input (line 3) | fn parse_input() -> (i64, i64, i64, i64) { function main (line 17) | fn main() { FILE: advent-of-code/2021/day18/src/main.rs type Part (line 4) | enum Part { type Snailfish (line 13) | type Snailfish = Vec; function parse_number (line 15) | fn parse_number(text: &str) -> Snailfish { function explode (line 27) | fn explode(snailfish: Snailfish) -> Snailfish { function split (line 86) | fn split(snailfish: Snailfish) -> Snailfish { function reduce (line 110) | fn reduce(snailfish: Snailfish) -> Snailfish { function add (line 130) | fn add(mut first: Snailfish, mut second: Snailfish) -> Snailfish { function magnitude (line 141) | fn magnitude(snailfish: &Snailfish) -> u64 { function parse_input (line 166) | fn parse_input() -> Vec { function main (line 174) | fn main() { FILE: advent-of-code/2021/day19/src/main.rs type Number (line 7) | type Number = i16; type Matrix (line 11) | struct Matrix([[Number; 4]; 4]); method translate (line 90) | fn translate(point: Point) -> Matrix { method rotations (line 99) | fn rotations() -> Vec { type Point (line 15) | struct Point([Number; 4]); method new (line 121) | fn new(x: Number, y: Number, z: Number) -> Point { method manhattan (line 125) | fn manhattan(&self, other: &Point) -> Number { type Variation (line 17) | struct Variation { type Scanner (line 22) | struct Scanner { type Beacons (line 28) | type Beacons = Vec; type Output (line 31) | type Output = Point; function sub (line 33) | fn sub(self, rhs: &Point) -> Self::Output { type Output (line 44) | type Output = Matrix; function mul (line 46) | fn mul(self, rhs: &Matrix) -> Self::Output { type Output (line 62) | type Output = Point; function mul (line 64) | fn mul(self, rhs: &Point) -> Self::Output { function parse_input (line 130) | fn parse_input() -> Vec { function overlap_transformation (line 148) | fn overlap_transformation(first: &Scanner, second: &Scanner) -> Option Vec { function merge (line 200) | fn merge(scanners: &mut Vec) { function main (line 225) | fn main() { FILE: advent-of-code/2021/day20/src/main.rs type Number (line 3) | type Number = i32; type Point (line 4) | type Point = (Number, Number); function parse_input (line 6) | fn parse_input() -> (String, HashSet) { function iterate (line 26) | fn iterate(points: &HashSet, decoder: &String, mode: bool) -> Has... function main (line 68) | fn main() { FILE: advent-of-code/2021/day21/src/main.rs type Game (line 4) | struct Game { method from (line 11) | fn from(positions: (u16, u16)) -> Game { method is_finished (line 18) | fn is_finished(&self, winning_score: u16) -> bool { method leader (line 22) | fn leader(&self) -> usize { method play (line 30) | fn play(&self, roll: u16) -> Game { function parse_input (line 44) | fn parse_input() -> (u16, u16) { function increment_position (line 53) | fn increment_position(position: u16, count: u16) -> u16 { function first (line 57) | fn first(positions: (u16, u16)) -> u64 { function second (line 76) | fn second(positions: (u16, u16)) -> u64 { function main (line 111) | fn main() { FILE: advent-of-code/2021/day22/src/main.rs type Num (line 3) | type Num = i64; type Interval (line 6) | struct Interval { method new (line 12) | fn new(from: Num, to: Num) -> Interval { method truncate (line 19) | fn truncate(&self, other: &Interval) -> Interval { method overlaps (line 23) | fn overlaps(&self, other: &Interval) -> bool { method len (line 27) | fn len(&self) -> Num { method split (line 31) | fn split(a: &Interval, b: &Interval) -> [Interval; 3] { type Cuboid (line 43) | struct Cuboid { method truncate (line 50) | fn truncate(&self, interval: Interval) -> Cuboid { method overlaps (line 58) | fn overlaps(&self, other: &Cuboid) -> bool { method subtract (line 62) | fn subtract(&self, other: &Cuboid) -> Vec { method volume (line 84) | fn volume(&self) -> Num { function parse_input (line 89) | fn parse_input() -> Vec<(Cuboid, bool)> { function solve (line 120) | fn solve(input: Vec<(Cuboid, bool)>) -> Num { function main (line 137) | fn main() { FILE: advent-of-code/2021/day23/src/main.rs type Cost (line 5) | type Cost = i32; type Point (line 6) | type Point = (usize, usize); type Game (line 9) | struct Game { method all_moves (line 58) | fn all_moves(&self) -> Vec<(Game, Cost)> { method possible_moves (line 78) | fn possible_moves(&self, point: Point) -> Vec { method at (line 106) | fn at(&self, point: Point) -> &u8 { method at_mut (line 110) | fn at_mut(&mut self, point: Point) -> &mut u8 { method room_slot (line 114) | fn room_slot(&self, char: u8) -> Option { method can_cross (line 128) | fn can_cross(&self, from: usize, to: usize) -> bool { method depth (line 136) | fn depth(&self) -> usize { method walk (line 140) | fn walk(&self, from: Point, to: Point) -> Game { method should_stay (line 151) | fn should_stay(&self, point: Point) -> bool { method can_exit (line 158) | fn can_exit(&self, point: Point) -> bool { method is_solved (line 162) | fn is_solved(&self) -> bool { function is_amphipod (line 13) | fn is_amphipod(char: u8) -> bool { function is_empty (line 17) | fn is_empty(char: u8) -> bool { function is_room (line 21) | fn is_room(point: Point) -> bool { function is_hallway (line 25) | fn is_hallway(point: Point) -> bool { function cost (line 29) | fn cost(from: Point, to: Point, char: u8) -> Cost { function weight (line 33) | fn weight(char: u8) -> Cost { function dedicated_room (line 43) | fn dedicated_room(char: u8) -> usize { function is_entrance (line 53) | fn is_entrance(y: usize) -> bool { function parse_input (line 170) | fn parse_input() -> Game { function solve (line 181) | fn solve(game: Game) -> Cost { function unfold (line 208) | fn unfold(game: &Game) -> Game { function main (line 225) | fn main() { FILE: advent-of-code/2021/day24/src/main.rs type Num (line 3) | type Num = i32; function main (line 5) | fn main() { FILE: advent-of-code/2021/day25/src/main.rs function main (line 3) | fn main() { FILE: go/gopl/01/01/echo.go function main (line 15) | func main() { function echo (line 19) | func echo(args []string) { FILE: go/gopl/01/01/echo_test.go function TestEcho (line 8) | func TestEcho(t *testing.T) { FILE: go/gopl/01/02/echo.go function main (line 14) | func main() { function echo (line 18) | func echo(args []string) { FILE: go/gopl/01/02/echo_test.go function TestEcho (line 8) | func TestEcho(t *testing.T) { FILE: go/gopl/01/03/echo.go function main (line 15) | func main() { function echo1 (line 19) | func echo1(out io.Writer, args []string) { function echo2 (line 28) | func echo2(out io.Writer, args []string) { function echo3 (line 37) | func echo3(out io.Writer, args []string) { FILE: go/gopl/01/03/echo_test.go function TestEcho1 (line 25) | func TestEcho1(t *testing.T) { function TestEcho2 (line 40) | func TestEcho2(t *testing.T) { function TestEcho3 (line 55) | func TestEcho3(t *testing.T) { function BenchmarkEcho1 (line 70) | func BenchmarkEcho1(b *testing.B) { function BenchmarkEcho2 (line 77) | func BenchmarkEcho2(b *testing.B) { function BenchmarkEcho3 (line 84) | func BenchmarkEcho3(b *testing.B) { FILE: go/gopl/01/04/dup.go function main (line 15) | func main() { function dup2 (line 19) | func dup2(out io.Writer, files []string) { function countLines (line 48) | func countLines(f *os.File, filename string, counts map[string]int, loca... FILE: go/gopl/01/04/dup_test.go function TestDup (line 10) | func TestDup(t *testing.T) { FILE: go/gopl/01/05/lissajous.go constant foregroundIndex (line 20) | foregroundIndex = 0 constant backgroundIndex (line 21) | backgroundIndex = 1 function main (line 24) | func main() { function lissajous (line 28) | func lissajous(out io.Writer) { FILE: go/gopl/01/06/lissajous.go constant foregroundIndex (line 26) | foregroundIndex = 0 constant backgroundIndex (line 27) | backgroundIndex = 1 function main (line 30) | func main() { function lissajous (line 34) | func lissajous(out io.Writer) { FILE: go/gopl/01/07/fetch.go function main (line 14) | func main() { FILE: go/gopl/01/08/fetch.go function main (line 13) | func main() { FILE: go/gopl/01/09/fetch.go function main (line 13) | func main() { FILE: java/tdd_by_example/Money.java class Money (line 5) | public class Money implements Expression { method Money (line 9) | public Money(int amount, String currency) { method equals (line 14) | @Override method dollar (line 20) | public static Money dollar(int amount) { method franc (line 24) | public static Money franc(int amount) { method times (line 28) | public Expression times(int multiplier) { method currency (line 32) | public String currency() { method plus (line 36) | public Expression plus(Expression addend) { method reduce (line 40) | public Money reduce(Bank bank, String to) { method toString (line 44) | @Override type Expression (line 50) | interface Expression { method reduce (line 51) | Money reduce(Bank bank, String to); method times (line 52) | Expression times(int multiplier); method plus (line 53) | Expression plus(Expression addend); class Sum (line 56) | class Sum implements Expression { method Sum (line 60) | public Sum(Expression augend, Expression addend) { method reduce (line 65) | public Money reduce(Bank bank, String to) { method plus (line 70) | public Expression plus(Expression addend) { method times (line 74) | public Expression times(int multiplier) { class Bank (line 79) | class Bank { method reduce (line 83) | public Money reduce(Expression source, String to) { method addRate (line 87) | public void addRate(String from, String to, int amount) { method rate (line 91) | int rate(String from, String to) { class Pair (line 97) | class Pair { method Pair (line 101) | Pair(String from, String to) { method equals (line 106) | @Override method hashCode (line 112) | @Override FILE: java/tdd_by_example/MoneyTest.java class MoneyTest (line 4) | public class MoneyTest extends TestCase { method testMultiplication (line 5) | public void testMultiplication() { method testEquality (line 11) | public void testEquality() { method testSimpleAddition (line 17) | public void testSimpleAddition() { method testCurrency (line 25) | public void testCurrency() { method testPlusReturnsSumm (line 30) | public void testPlusReturnsSumm() { method testReduceSum (line 39) | public void testReduceSum() { method testReduceMoney (line 46) | public void testReduceMoney() { method testReduceMoneyDifferentCurreny (line 52) | public void testReduceMoneyDifferentCurreny() { method testIdentityRate (line 59) | public void testIdentityRate() { method testMixedAddition (line 63) | public void testMixedAddition() { method testSumPlusMoney (line 72) | public void testSumPlusMoney() { method testSumTimes (line 82) | public void testSumTimes() { FILE: other/clrs/02/03/02.c function merge (line 3) | void merge(int A[], int p, int q, int r) { function merge_sort (line 30) | void merge_sort(int A[], int p, int r) { FILE: other/clrs/02/03/02.test.c function TEST (line 4) | TEST(trivial_case) { function TEST (line 13) | TEST(chapter_example) { function TEST (line 22) | TEST(exercise_example) { function TEST (line 31) | TEST(reversed_merge) { FILE: other/clrs/02/03/05.c function binary_search (line 2) | int binary_search(int A[], int length, int v) { FILE: other/clrs/02/03/05.test.c function TEST (line 4) | TEST(array_empty) { function TEST (line 11) | TEST(array_one_element) { function TEST (line 21) | TEST(array_odd_elements) { function TEST (line 39) | TEST(array_even_elements) { FILE: other/clrs/02/problems/01.c function merge (line 7) | void merge(int A[], int p, int q, int r) { function merge_sort (line 42) | void merge_sort(int A[], int p, int r) { function insertion_sort (line 51) | void insertion_sort(int A[], int p, int r) { function selection_sort (line 65) | void selection_sort(int A[], int p, int r) { function mixed_sort_insertion (line 78) | void mixed_sort_insertion(int A[], int p, int r) { function mixed_sort_selection (line 91) | void mixed_sort_selection(int A[], int p, int r) { FILE: other/clrs/02/problems/01.py function insertion_sort (line 3) | def insertion_sort(A, p, r): function merge (line 12) | def merge(A, p, q, r): function merge_sort (line 41) | def merge_sort(A, p, r): function mixed_sort (line 48) | def mixed_sort(A, p, r): FILE: other/clrs/02/problems/01.run.c function randomize_array (line 20) | void randomize_array(int array[], unsigned length, unsigned int seed) { function check_sorted (line 27) | void check_sorted(int array[], int length) { function main (line 37) | int main() { FILE: other/clrs/02/problems/01.run.py function report_time (line 8) | def report_time(name, func): FILE: other/clrs/02/problems/04.c function merge (line 3) | int merge(int A[], int p, int q, int r) { function merge_sort (line 31) | int merge_sort(int A[], int p, int r) { FILE: other/clrs/02/problems/04.test.c function TEST (line 4) | TEST(trivial_case) { function TEST (line 11) | TEST(problem_example) { function TEST (line 18) | TEST(chapter_example) { function TEST (line 26) | TEST(reversed_array) { FILE: other/clrs/04/01/03.c type max_subarray (line 7) | typedef struct { function max_subarray (line 15) | max_subarray find_maximum_subarray_brute(int A[], unsigned low, unsigned... function max_subarray (line 35) | max_subarray find_max_crossing_subarray(int A[], unsigned low, unsigned ... function max_subarray (line 63) | max_subarray find_maximum_subarray(int A[], unsigned low, unsigned high) { function max_subarray (line 85) | max_subarray find_maximum_subarray_mixed(int A[], unsigned low, unsigned... FILE: other/clrs/04/01/03.run.c function randomize_array (line 23) | void randomize_array(int array[], unsigned length, unsigned int seed) { function check_right_answer (line 30) | void check_right_answer(max_subarray expected, max_subarray actual) { function main (line 39) | int main() { FILE: other/clrs/04/01/03.test.c function TEST (line 4) | TEST(chapter_example_brute) { function TEST (line 13) | TEST(chapter_example_divide_and_conquer) { function TEST (line 22) | TEST(chapter_example_mixed) { FILE: other/clrs/04/01/04.c type max_subarray (line 3) | typedef struct { function max_subarray (line 9) | max_subarray find_max_crossing_subarray(int A[], unsigned low, unsigned ... function max_subarray (line 42) | max_subarray find_maximum_subarray(int A[], unsigned low, unsigned high) { FILE: other/clrs/04/01/04.test.c function TEST (line 4) | TEST(chapter_example) { function TEST (line 13) | TEST(negative_numbers) { function TEST (line 21) | TEST(trivial_case_negative_numbers) { function TEST (line 29) | TEST(trivial_case_positive_numbers) { FILE: other/clrs/04/01/05.c type max_subarray (line 1) | typedef struct { function max_subarray (line 7) | max_subarray find_maximum_subarray(int A[], unsigned low, unsigned high) { FILE: other/clrs/04/01/05.test.c function TEST (line 6) | TEST(chapter_example) { function TEST (line 15) | TEST(negative_numbers) { function TEST (line 24) | TEST(trivial_case_negative_numbers) { function TEST (line 33) | TEST(trivial_case_positive_numbers) { function TEST (line 45) | TEST(comparison_with_brute_force) { function max_subarray (line 58) | max_subarray find_maximum_subarray_brute(int A[], unsigned low, unsigned... function generate_random_array (line 76) | void generate_random_array(int array[], unsigned size, unsigned seed) { FILE: other/clrs/04/02/02.c type matrix (line 7) | typedef struct { function get (line 17) | int get(matrix m, int x, int y) { function put (line 21) | void put(matrix m, int x, int y, int value) { function matrix (line 27) | matrix create_matrix(int size, int *data) { function matrix (line 38) | matrix submatrix(matrix A, int x, int y, int size) { function plus (line 57) | void plus(matrix C, matrix A, matrix B) { function minus (line 65) | void minus(matrix C, matrix A, matrix B) { function add (line 73) | void add(matrix T, matrix S) { function sub (line 80) | void sub(matrix T, matrix S) { function zero (line 88) | void zero(matrix m) { function print_matrix (line 98) | void print_matrix(matrix m) { function strassen (line 112) | void strassen(matrix C, matrix A, matrix B) { FILE: other/clrs/04/02/02.test.c function multiply (line 10) | void multiply(matrix C, matrix A, matrix B) { function TEST (line 24) | TEST(random_matches) { FILE: other/clrs/04/problems/05.py class GoodChip (line 3) | class GoodChip: method good (line 4) | def good(self): method check (line 7) | def check(self, other): class BadChip (line 10) | class BadChip: method good (line 11) | def good(self): method check (line 14) | def check(self, other): function jig (line 17) | def jig(a, b): function diogenes (line 20) | def diogenes(chips, verbose = False): FILE: other/clrs/04/problems/05.test.py function generate_chips (line 12) | def generate_chips(count): class DiogenesTest (line 20) | class DiogenesTest(unittest.TestCase): method test_correctness (line 21) | def test_correctness(self): FILE: other/clrs/04/problems/06.c type array (line 1) | typedef struct array { function get (line 8) | int get(array A, int i, int j) { function array (line 12) | array half(array a) { function height (line 17) | int height(array array) { function min_index (line 21) | int min_index(array A, int row, int left, int right) { function find_minimums (line 33) | void find_minimums(array A, int *mins) { FILE: other/clrs/04/problems/06.test.c function TEST (line 4) | TEST(large_example) { function TEST (line 20) | TEST(small_example) { FILE: other/clrs/06/02/05.c type heap (line 5) | typedef struct { function max_heapify (line 11) | void max_heapify(heap A, int i) { FILE: other/clrs/06/02/05.test.c function TEST (line 4) | TEST(chapter_example) { function TEST (line 15) | TEST(exercise_6_2_1_example) { FILE: other/clrs/06/05/03.c type heap_t (line 9) | typedef struct { function heap_minimum (line 15) | int heap_minimum(heap_t *heap) { function min_heapify (line 19) | void min_heapify(heap_t *heap, int i) { function heap_extract_min (line 43) | int heap_extract_min(heap_t *heap) { function heap_decrease_key (line 57) | void heap_decrease_key(heap_t *heap, int i, int key) { function min_heap_insert (line 72) | void min_heap_insert(heap_t *heap, int key) { FILE: other/clrs/06/05/03.test.c function TEST (line 4) | TEST(heap_minumum) { function TEST (line 11) | TEST(heap_extract_min) { function TEST (line 24) | TEST(heap_decrease_key) { function TEST (line 34) | TEST(min_heap_insert) { FILE: other/clrs/06/05/06.c type heap_t (line 9) | typedef struct { function heap_increase_key (line 15) | void heap_increase_key(heap_t *heap, int i, int key) { FILE: other/clrs/06/05/06.test.c function TEST (line 4) | TEST(heap_increase_key) { FILE: other/clrs/06/problems/01.py class heap (line 5) | class heap: method __init__ (line 6) | def __init__(self, items, size = None): method __getitem__ (line 10) | def __getitem__(self, key): method __setitem__ (line 13) | def __setitem__(self, key, value): method __len__ (line 16) | def __len__(self): function left (line 19) | def left(i): function right (line 22) | def right(i): function parent (line 25) | def parent(i): function max_heapify (line 32) | def max_heapify(A, i): function build_max_heap (line 46) | def build_max_heap(A): function heap_increase_key (line 55) | def heap_increase_key(A, i, key): function max_heap_insert (line 63) | def max_heap_insert(A, key): function build_max_heap2 (line 68) | def build_max_heap2(A): FILE: other/clrs/06/problems/02.c type heap_t (line 8) | typedef struct { function max_heapify (line 15) | void max_heapify(heap_t *heap, int i) { function extract_max (line 33) | int extract_max(heap_t *heap) { function increase_key (line 41) | void increase_key(heap_t *heap, int i, int key) { function insert (line 55) | void insert(heap_t *heap, int key) { FILE: other/clrs/06/problems/02.test.c function TEST (line 4) | TEST(extract_min) { function TEST (line 16) | TEST(insert) { FILE: other/clrs/06/problems/03.c type cell (line 6) | typedef struct { type tableau_t (line 11) | typedef struct { function cell (line 17) | cell up(cell c) { function cell (line 22) | cell down(cell c) { function cell (line 27) | cell left(cell c) { function cell (line 32) | cell right(cell c) { function cell (line 37) | cell make_cell(int i, int j) { function within (line 42) | bool within(tableau_t *tableau, cell c) { function get (line 46) | int get(tableau_t *tableau, cell c) { function set (line 51) | void set(tableau_t *tableau, cell c, int value) { function init_empty_tableau (line 56) | void init_empty_tableau(tableau_t *tableau) { function extract_min (line 62) | int extract_min(tableau_t *tableau) { function insert (line 101) | void insert(tableau_t *tableau, int key) { function sort (line 137) | void sort(int *array, int size_sqrt) { function find (line 153) | bool find(tableau_t *tableau, int key) { FILE: other/clrs/06/problems/03.test.c function TEST (line 4) | TEST(extract_min) { function TEST (line 20) | TEST(insert) { function TEST (line 35) | TEST(sort) { function TEST (line 44) | TEST(find) { FILE: other/clrs/07/01/02.py function partition (line 1) | def partition(numbers, start = 0, end = None): function quicksort (line 21) | def quicksort(numbers, start = 0, end = None): FILE: other/clrs/07/01/02.test.py class PartitionTest (line 10) | class PartitionTest(unittest.TestCase): method test_normal_partition (line 11) | def test_normal_partition(self): method test_partition_with_repetition (line 17) | def test_partition_with_repetition(self): method test_quicksort (line 21) | def test_quicksort(self): FILE: other/clrs/07/04/05.c function quicksort (line 7) | void quicksort(int A[], int p, int r) { function modified_quicksort (line 15) | void modified_quicksort(int A[], int p, int r) { function limited_quicksort (line 20) | void limited_quicksort(int A[], int p, int r, int treshold) { function partition (line 28) | int partition(int A[], int p, int r) { function insertion_sort (line 50) | void insertion_sort(int A[], int p, int r) { FILE: other/clrs/07/04/05.run.c function randomize_array (line 19) | void randomize_array(int array[], unsigned length, unsigned int seed) { function check_sorted (line 26) | void check_sorted(int array[], int length) { function main (line 36) | int main() { FILE: other/clrs/07/04/05.test.c function TEST (line 4) | TEST(trivial_case) { FILE: other/clrs/07/problems/01.c function hoare_partition (line 3) | int hoare_partition(int A[], int p, int r) { function quicksort (line 21) | void quicksort(int A[], int p, int r) { FILE: other/clrs/07/problems/01.test.c function TEST (line 4) | TEST(partitioning) { function TEST (line 14) | TEST(sorting) { FILE: other/clrs/07/problems/02.c type pivot_t (line 5) | typedef struct { function quicksort (line 13) | void quicksort(int A[], int p, int r) { function pivot_t (line 21) | pivot_t randomized_partition(int A[], int p, int r) { function pivot_t (line 30) | pivot_t partition(int A[], int p, int r) { FILE: other/clrs/07/problems/02.test.c function TEST (line 10) | TEST(partitioning) { function TEST (line 21) | TEST(sorting) { function TEST (line 30) | TEST(large_array) { function randomize_array (line 42) | void randomize_array(int array[], unsigned length, unsigned int seed) { function is_sorted (line 49) | bool is_sorted(int array[], int length) { FILE: other/clrs/07/problems/04.c function tail_recursive_quicksort (line 12) | void tail_recursive_quicksort(int A[], int p, int r) { function partition (line 30) | int partition(int A[], int p, int r) { function increment_stack_depth (line 48) | void increment_stack_depth() { function decrement_stack_depth (line 55) | void decrement_stack_depth() { function reset_stack_depth_counter (line 59) | void reset_stack_depth_counter() { FILE: other/clrs/07/problems/04.test.c function TEST (line 11) | TEST(sorting) { function TEST (line 20) | TEST(stack_depth) { function TEST (line 32) | TEST(large_array) { function randomize_array (line 46) | void randomize_array(int array[], unsigned length, unsigned int seed) { function is_sorted (line 53) | bool is_sorted(int array[], int length) { FILE: other/clrs/07/problems/06.c type interval (line 4) | typedef struct { function intersects (line 9) | bool intersects(interval a, interval b) { return a.left <= b.right && b.... function before (line 10) | bool before(interval a, interval b) { return a.right < b.left; } function after (line 11) | bool after(interval a, interval b) { return a.left > b.right; } function interval (line 15) | interval partition(interval A[], int p, int r) { function fuzzy_sort (line 56) | void fuzzy_sort(interval array[], int p, int r) { FILE: other/clrs/07/problems/06.test.c function TEST (line 4) | TEST(intersects) { function TEST (line 17) | TEST(sorting) { function randomize_array (line 28) | void randomize_array(interval array[], unsigned length, unsigned int see... function is_sorted (line 36) | bool is_sorted(interval array[], int length) { FILE: other/clrs/08/problems/02.c type item (line 3) | typedef struct { function stable_linear_sort (line 12) | void stable_linear_sort(item *A, int size) { function linear_in_place_sort (line 38) | void linear_in_place_sort(item *A, int size) { function stable_in_place_sort (line 54) | void stable_in_place_sort(item *A, int size) { function in_place_counting_sort (line 64) | void in_place_counting_sort(item *A, int size, int range) { FILE: other/clrs/08/problems/02.test.c function TEST (line 14) | TEST(stable_linear) { function TEST (line 24) | TEST(linear_in_place) { function TEST (line 33) | TEST(stable_in_place) { function TEST (line 43) | TEST(in_place_counting_sort) { function generate_binary_array (line 54) | void generate_binary_array(item *A, int size, int from, int to) { function assert_sorted (line 62) | void assert_sorted(item *A, int size) { function assert_stable (line 70) | void assert_stable(item *A, int size) { function next_id (line 78) | int next_id() { FILE: other/clrs/08/problems/03.c type item (line 17) | typedef struct { function sort_numbers (line 46) | void sort_numbers(item *A, int size, int max_digits) { function sort_strings (line 56) | void sort_strings(item *A, int size, int max_length) { function partition (line 71) | void partition(item *A, int size, int max_dimension, int *groups, dimens... function radix_sort (line 92) | void radix_sort(item *A, int left, int right, int digits, key_f key) { function counting_sort (line 100) | void counting_sort(item *A, int left, int right, int dimension, key_f ke... function count_digits (line 121) | int count_digits(int n) { function nth_digit (line 129) | int nth_digit(int n, int d) { function item_nth_digit (line 135) | int item_nth_digit(item i, int d) { function item_digits (line 139) | int item_digits(item i) { function item_string_length (line 143) | int item_string_length(item a) { function item_nth_char (line 147) | int item_nth_char(item a, int n) { FILE: other/clrs/08/problems/03.test.c function TEST (line 18) | TEST(sort_numbers) { function TEST (line 28) | TEST(sort_strings) { function compare_strings (line 38) | int compare_strings(item a, item b) { function compare_numbers (line 42) | int compare_numbers(item a, item b) { function assert_sorted (line 46) | void assert_sorted(item *A, int size, compare_f compare) { function assert_stable (line 54) | void assert_stable(item *A, int size, compare_f compare) { function next_id (line 62) | int next_id() { function generate_random_numbers (line 67) | int generate_random_numbers(item *numbers) { function generate_random_strings (line 92) | int generate_random_strings(item *strings) { FILE: other/clrs/08/problems/04.c type jug (line 3) | typedef int jug; function quadratic_pair (line 10) | void quadratic_pair(jug *red, jug *blue, int size) { function quick_pair (line 23) | void quick_pair(jug *red, jug *blue, int p, int r) { function partition (line 31) | int partition(jug *red, jug *blue, int p, int q) { function cmp (line 79) | int cmp(jug red, jug blue) { FILE: other/clrs/08/problems/04.test.c function TEST (line 11) | TEST(quadratic_pairing) { function TEST (line 22) | TEST(quick_pairing) { function generate_jugs (line 33) | void generate_jugs(int *red, int *blue) { function assert_paired (line 49) | void assert_paired(int *red, int *blue) { FILE: other/clrs/08/problems/05.c type item (line 6) | typedef struct { type heap_t (line 11) | typedef struct { type sort_state_t (line 17) | typedef struct { function k_sort (line 36) | void k_sort(int *numbers, int size, int k) { function merge_k_sorted (line 49) | void merge_k_sorted(int *numbers, int size, int k) { function state_took_column (line 80) | int state_took_column(sort_state_t *state, int index) { function merge (line 114) | void merge(int A[], int p, int q, int r, int k, int s) { function merge_sort (line 139) | void merge_sort(int A[], int p, int r, int k, int s) { function item (line 161) | item heap_minimum(heap_t *heap) { function min_heapify (line 165) | void min_heapify(heap_t *heap, int i) { function item (line 189) | item heap_extract_min(heap_t *heap) { function heap_decrease_key (line 203) | void heap_decrease_key(heap_t *heap, int i, item key) { function min_heap_insert (line 218) | void min_heap_insert(heap_t *heap, item key) { function item (line 230) | item min_heap_push_pop(heap_t *heap, item new) { FILE: other/clrs/08/problems/05.test.c function TEST (line 14) | TEST(k_sorting) { function TEST (line 22) | TEST(merging_k_sorted) { function assert_k_sorted (line 31) | void assert_k_sorted(int *numbers, int k) { function generate_random_array (line 40) | void generate_random_array(int *numbers) { FILE: other/clrs/08/problems/07.c type number (line 8) | typedef unsigned int number; type column_t (line 10) | typedef struct { function columnsort (line 25) | void columnsort(number *A, size_t r, size_t s, column_sorter sort_column... function compare (line 65) | int compare(const void *a, const void *b) { function check_dimensions (line 82) | void check_dimensions(size_t r, size_t s) { function sort (line 103) | void sort(number *A, column_t column) { function sequential_sort_columns (line 111) | void sequential_sort_columns(number *numbers, column_t *columns, int siz... type job_t (line 123) | typedef struct { function threaded_sort_columns (line 134) | void threaded_sort_columns(number *numbers, column_t *columns, int size) { FILE: other/clrs/08/problems/07.run.c function current_utc_time (line 9) | void current_utc_time(struct timespec *ts) { type timespec (line 24) | struct timespec function main (line 40) | int main() { FILE: other/clrs/08/problems/07.test.c function TEST (line 16) | TEST(single_process_columnsort) { function TEST (line 23) | TEST(paralel_sort) { function assert_sorted (line 30) | void assert_sorted(number *A, size_t size) { function randomize (line 38) | void randomize(number *A, size_t size) { function print_mesh (line 49) | void print_mesh(number *A, size_t r, size_t s) { FILE: other/clrs/09/02/03.c function randomized_select (line 8) | int randomized_select(int *A, int p, int r, int i) { function partition (line 26) | int partition(int *A, int p, int r) { function randomized_partition (line 44) | int randomized_partition(int *A, int p, int r) { FILE: other/clrs/09/02/03.test.c function TEST (line 9) | TEST(ith_order_statistic) { function generate_array (line 22) | void generate_array(int *numbers, int size) { FILE: other/clrs/09/03/05.py function select (line 1) | def select(items, n): function median (line 13) | def median(items): FILE: other/clrs/09/03/05.test.py class SelectionTest (line 9) | class SelectionTest(unittest.TestCase): method test_select (line 10) | def test_select(self): FILE: other/clrs/09/03/06.py function k_quantiles (line 3) | def k_quantiles(items, k): function median_index (line 31) | def median_index(n): function partition (line 37) | def partition(items, element): function select (line 52) | def select(items, n): FILE: other/clrs/09/03/06.test.py function shuffled (line 9) | def shuffled(n): function visualize (line 14) | def visualize(n, k): class QuantilesTest (line 24) | class QuantilesTest(unittest.TestCase): method test_k_quantiles (line 25) | def test_k_quantiles(self): method test_visualized_quantiles (line 32) | def test_visualized_quantiles(self): FILE: other/clrs/09/03/08.py function two_array_median (line 1) | def two_array_median(a, b): function median_index (line 12) | def median_index(n): FILE: other/clrs/09/03/08.test.py function shuffled (line 9) | def shuffled(n): class QuantilesTest (line 14) | class QuantilesTest(unittest.TestCase): method test_k_quantiles (line 15) | def test_k_quantiles(self): FILE: other/clrs/10/01/05.c type deque_t (line 6) | typedef struct { function init_deque (line 12) | void init_deque(deque_t *deque) { function is_empty (line 17) | int is_empty(deque_t *deque) { function push (line 21) | void push(deque_t *deque, int n) { function unshift (line 36) | void unshift(deque_t *deque, int n) { function pop (line 50) | int pop(deque_t *deque) { function shift (line 65) | int shift(deque_t *deque) { FILE: other/clrs/10/01/05.test.c function TEST (line 4) | TEST(using_as_a_stack) { function TEST (line 24) | TEST(using_as_queue) { function TEST (line 39) | TEST(unshifting) { function TEST (line 54) | TEST(wrapping_around_on_push) { function TEST (line 70) | TEST(wrapping_around_on_shift) { FILE: other/clrs/10/02/05.c type node_t (line 3) | typedef struct node_t { type list_t (line 8) | typedef struct { function init_list (line 12) | void init_list(list_t *list) { function destroy_list (line 17) | void destroy_list(list_t *list) { function insert (line 28) | void insert(list_t *list, int key) { function node_t (line 35) | node_t *search(list_t *list, int key) { function delete (line 51) | void delete(list_t *list, int key) { FILE: other/clrs/10/02/05.test.c function TEST (line 4) | TEST(inserting_and_searching) { function TEST (line 20) | TEST(deleting) { function TEST (line 42) | TEST(deleting_an_element_inserted_multiple_times) { FILE: other/clrs/10/02/07.c type node_t (line 3) | typedef struct node_t { type list_t (line 8) | typedef struct { function init_list (line 12) | void init_list(list_t *list) { function destroy_list (line 17) | void destroy_list(list_t *list) { function insert (line 28) | void insert(list_t *list, int key) { function reverse (line 35) | void reverse(list_t *list) { FILE: other/clrs/10/02/07.test.c function TEST (line 4) | TEST(inserting_and_searching) { FILE: other/clrs/10/02/08.c type node_t (line 4) | typedef struct node_t { type list_t (line 9) | typedef struct { function node_t (line 14) | node_t *xor(node_t *left, node_t *right) { function init_list (line 18) | void init_list(list_t *list) { function destroy_list (line 23) | void destroy_list(list_t *list) { function insert (line 36) | void insert(list_t *list, int key) { function get (line 52) | int get(list_t *list, int index) { function node_t (line 70) | node_t *search(list_t *list, int key) { function delete (line 88) | void delete(list_t *list, int key) { function reverse (line 118) | void reverse(list_t *list) { FILE: other/clrs/10/02/08.test.c function TEST (line 4) | TEST(inserting_and_searching) { function TEST (line 21) | TEST(deleting) { function TEST (line 39) | TEST(reversing) { FILE: other/clrs/10/03/02.c type list_t (line 6) | typedef int list_t; type obj_t (line 7) | typedef int obj_t; function init_storage (line 17) | void init_storage() { function list_t (line 26) | list_t allocate_object() { function free_object (line 37) | void free_object(list_t list) { function list_t (line 42) | list_t cons(obj_t key, list_t list) { function delete (line 56) | void delete(list_t list) { function obj_t (line 68) | obj_t get(list) { function list_t (line 73) | list_t next(list) { FILE: other/clrs/10/03/02.test.c function TEST (line 4) | TEST(adding_elements) { function TEST (line 19) | TEST(removing_elements) { function TEST (line 36) | TEST(removing_and_adding) { FILE: other/clrs/10/03/05.c type list_t (line 6) | typedef int list_t; type obj_t (line 7) | typedef int obj_t; function init_storage (line 17) | void init_storage() { function list_t (line 26) | list_t allocate_object() { function free_object (line 37) | void free_object(list_t list) { function list_t (line 42) | list_t cons(obj_t key, list_t list) { function delete (line 56) | void delete(list_t list) { function obj_t (line 68) | obj_t get(list) { function list_t (line 73) | list_t next_obj(list) { function list_t (line 78) | list_t compatify_list(list_t list) { FILE: other/clrs/10/03/05.test.c function TEST (line 4) | TEST(compactify) { FILE: other/clrs/10/04/02.c type tree_t (line 1) | struct tree_t { type tree_t (line 7) | typedef struct tree_t tree_t; function print_tree (line 10) | void print_tree(tree_t *tree) { function reset_storage (line 24) | void reset_storage() { function store (line 28) | void store(int key) { FILE: other/clrs/10/04/02.test.c function tree_t (line 6) | tree_t* make_tree(int key) { function tree_t (line 15) | tree_t* make_left(tree_t *parent, int key) { function tree_t (line 22) | tree_t* make_right(tree_t *parent, int key) { function TEST (line 29) | TEST(quote_printing_unquote) { FILE: other/clrs/10/04/03.c type tree_t (line 3) | struct tree_t { type tree_t (line 9) | typedef struct tree_t tree_t; function print_tree (line 12) | void print_tree(tree_t *tree) { function reset_storage (line 34) | void reset_storage() { function store (line 38) | void store(int key) { FILE: other/clrs/10/04/03.test.c function tree_t (line 6) | tree_t* make_tree(int key) { function tree_t (line 15) | tree_t* make_left(tree_t *parent, int key) { function tree_t (line 22) | tree_t* make_right(tree_t *parent, int key) { function TEST (line 29) | TEST(quote_printing_unquote) { FILE: other/clrs/10/04/04.c type tree_t (line 3) | struct tree_t { type tree_t (line 9) | typedef struct tree_t tree_t; function print_tree (line 12) | void print_tree(tree_t *tree) { function reset_storage (line 25) | void reset_storage() { function store (line 29) | void store(int key) { FILE: other/clrs/10/04/04.test.c function tree_t (line 6) | tree_t *make_tree(int key) { function tree_t (line 15) | tree_t *make_child(tree_t *parent, int key) { function tree_t (line 22) | tree_t *make_sibling(tree_t *left, int key) { function TEST (line 29) | TEST(quote_printing_unquote) { FILE: other/clrs/10/04/05.c type tree_t (line 1) | struct tree_t { type tree_t (line 7) | typedef struct tree_t tree_t; function print_tree (line 10) | void print_tree(tree_t *tree) { function reset_storage (line 35) | void reset_storage() { function store (line 39) | void store(int key) { FILE: other/clrs/10/04/05.test.c function tree_t (line 6) | tree_t* make_tree(int key) { function tree_t (line 15) | tree_t* make_left(tree_t *parent, int key) { function tree_t (line 22) | tree_t* make_right(tree_t *parent, int key) { function TEST (line 29) | TEST(quote_printing_unquote) { FILE: other/clrs/10/problems/02.c type list_t (line 8) | struct list_t { type list_t (line 13) | typedef struct list_t list_t; function list_t (line 15) | list_t *insert_sorted(list_t *list, int key) { function list_t (line 35) | list_t *delete_key(list_t *list, int key) { function list_t (line 61) | list_t *prepend(list_t *list, int key) { function find_min (line 70) | int find_min(list_t *list) { function list_t (line 84) | list_t *link_together(list_t *a, list_t *b) { function list_t (line 100) | list_t *merge_sorted(list_t *a, list_t *b) { type heap1 (line 129) | typedef struct { function heap1 (line 133) | heap1 *make_heap1() { function insert1 (line 139) | void insert1(heap1 *heap, int key) { function minimum1 (line 143) | int minimum1(heap1 *heap) { function extract_min1 (line 147) | int extract_min1(heap1 *heap) { function heap1 (line 155) | heap1 *union1(heap1 *ha, heap1 *hb) { type heap2 (line 169) | typedef struct { function heap2 (line 173) | heap2 *make_heap2() { function insert2 (line 179) | void insert2(heap2 *heap, int key) { function minimum2 (line 183) | int minimum2(heap2 *heap) { function extract_min2 (line 187) | int extract_min2(heap2 *heap) { function heap2 (line 193) | heap2 *union2(heap2 *ha, heap2 *hb) { FILE: other/clrs/10/problems/02.test.c function heap1 (line 4) | heap1 *build1(int first, ...) { function heap2 (line 19) | heap2 *build2(int first, ...) { function TEST (line 34) | TEST(heap1) { function TEST (line 47) | TEST(heap2) { FILE: other/clrs/11/02/04.c type value_t (line 10) | typedef int value_t; type element_t (line 12) | struct element_t type element_t (line 14) | typedef struct element_t { type hash_t (line 29) | typedef struct { function hash_value (line 36) | int hash_value(value_t value) { function remove_from_free_list (line 40) | void remove_from_free_list(hash_t *hash, element_t *element) { function return_to_free_list (line 46) | void return_to_free_list(hash_t *hash, element_t *element) { function element_t (line 56) | element_t *allocate(hash_t *hash) { function reallocate (line 66) | void reallocate(hash_t *hash, element_t *element) { function hash_t (line 89) | hash_t *make_hash() { function element_t (line 115) | element_t *search(hash_t *hash, value_t value) { function insert (line 131) | void insert(hash_t *hash, value_t value) { function delete (line 155) | void delete(hash_t *hash, value_t value) { function print_hash (line 199) | void print_hash(hash_t *hash) { FILE: other/clrs/11/02/04.test.c function TEST (line 4) | TEST(insertion) { function TEST (line 12) | TEST(deletion) { function TEST (line 21) | TEST(deleting_second_in_chain) { function TEST (line 33) | TEST(deleting_first_in_chain) { function TEST (line 45) | TEST(deleting_duplicates) { function TEST (line 48) | TEST(inserting_duplicates) { function TEST (line 60) | TEST(inserting_colisions) { function TEST (line 70) | TEST(inserting_in_foreign_slots) { function TEST (line 82) | TEST(complicated_example) { FILE: other/clrs/11/03/02.py function consthash (line 4) | def consthash(digits, m): FILE: other/clrs/11/03/02.test.py function digits_to_number (line 10) | def digits_to_number(digits): class HashingTest (line 16) | class HashingTest(unittest.TestCase): method test_select (line 17) | def test_select(self): FILE: other/clrs/11/03/04.py function h (line 8) | def h(k): FILE: other/clrs/11/04/01.py function populate (line 1) | def populate(m, keys, probe): function linear (line 19) | def linear(m): function quadratic (line 23) | def quadratic(m, c1, c2): function double (line 27) | def double(m): FILE: other/clrs/11/04/05.py function fn (line 5) | def fn(a): FILE: other/clrs/12/01/04.c type tree_t (line 1) | struct tree_t { type tree_t (line 6) | typedef struct tree_t tree_t; function preorder (line 10) | void preorder(tree_t *tree, callback_t *callback) { function postorder (line 18) | void postorder(tree_t *tree, callback_t *callback) { FILE: other/clrs/12/01/04.test.c function reset_storage (line 10) | void reset_storage() { function store (line 14) | void store(tree_t *tree) { function tree_t (line 18) | tree_t *s(int key, tree_t *left, tree_t *right) { function TEST (line 26) | TEST(preorder_walk) { function TEST (line 44) | TEST(postorder_walk) { FILE: other/clrs/12/02/02.c type tree_t (line 1) | struct tree_t { type tree_t (line 7) | typedef struct tree_t tree_t; function tree_t (line 9) | tree_t *minimum(tree_t *tree) { function tree_t (line 13) | tree_t *maximum(tree_t *tree) { FILE: other/clrs/12/02/02.test.c function tree_t (line 6) | tree_t *s(int key, tree_t *left, tree_t *right) { function TEST (line 20) | TEST(minumum) { function TEST (line 34) | TEST(maximum) { FILE: other/clrs/12/02/03.c type tree_t (line 1) | struct tree_t { type tree_t (line 7) | typedef struct tree_t tree_t; function tree_t (line 9) | tree_t *maximum(tree_t *tree) { function tree_t (line 14) | tree_t *predecessor(tree_t *tree) { FILE: other/clrs/12/02/03.test.c function tree_t (line 6) | tree_t *s(int key, tree_t *left, tree_t *right) { function TEST (line 20) | TEST(predecessor) { FILE: other/clrs/12/03/01.c type node_t (line 3) | struct node_t { type node_t (line 9) | typedef struct node_t node_t; type tree_t (line 11) | typedef struct { function tree_t (line 15) | tree_t *make_tree() { function node_t (line 21) | node_t *make_node(int key) { function node_t (line 32) | node_t *insert_node(node_t *node, int key) { function node_t (line 54) | node_t *insert(tree_t *tree, int key) { function node_t (line 64) | node_t *search(tree_t *tree, int key) { FILE: other/clrs/12/03/01.test.c function TEST (line 6) | TEST(insert) { FILE: other/clrs/12/03/05.c type node_t (line 3) | struct node_t { type node_t (line 9) | typedef struct node_t node_t; type tree_t (line 11) | typedef struct { function tree_t (line 15) | tree_t *make_tree() { function node_t (line 21) | node_t *make_node(int key) { function node_t (line 32) | node_t *insert(tree_t *tree, int key) { function node_t (line 63) | node_t *find_parent(tree_t *tree, node_t *node) { function find_parent_and_predecessor (line 80) | void find_parent_and_predecessor(tree_t *tree, node_t *node, node_t **pa... function transplant (line 106) | void transplant(tree_t *tree, node_t *parent, node_t *target, node_t *so... function delete_tree (line 116) | void delete_tree(tree_t *tree, node_t *node) { function node_t (line 142) | node_t *search(tree_t *tree, int key) { function inorder_walk (line 160) | void inorder_walk(node_t *node, callback_t callback) { function successor_walk (line 167) | void successor_walk(node_t *node, callback_t callback) { FILE: other/clrs/12/03/05.debug.c function height (line 8) | int height(node_t *tree) { function node_t (line 14) | node_t **make_array(int size) { function size (line 18) | int size(node_t *node) { function space (line 23) | void space(int i) { function level_pad (line 27) | int level_pad(int h) { function print_node (line 32) | void print_node(node_t *tree) { function print_tree (line 38) | void print_tree(tree_t *tree) { FILE: other/clrs/12/03/05.test.c function randomized_numbers (line 8) | void randomized_numbers(int seed, int max, int target[], int count) { function cmp (line 28) | int cmp(const void *pa, const void *pb) { function reset_buffer (line 40) | void reset_buffer() { function append_to_buffer (line 45) | void append_to_buffer(node_t *node) { function check_successor_invariant (line 49) | void check_successor_invariant(tree_t *tree) { function TEST (line 60) | TEST(inserting) { function TEST (line 77) | TEST(inorder_walk) { function TEST (line 97) | TEST(randomized_successor_walk) { function TEST (line 120) | TEST(deleting_case_a) { function TEST (line 140) | TEST(deleting_case_a_2) { function TEST (line 154) | TEST(deleting_case_b) { function TEST (line 175) | TEST(deleting_case_c) { function TEST (line 192) | TEST(deleting_case_d) { function TEST (line 220) | TEST(deleting_in_random_trees) { FILE: other/clrs/12/problems/02.c type node_t (line 4) | struct node_t { type node_t (line 10) | typedef struct node_t node_t; type radix_tree_t (line 12) | typedef struct { function node_t (line 18) | node_t *make_node() { function radix_tree_t (line 26) | radix_tree_t *make_radix_tree() { function insert (line 32) | void insert(radix_tree_t *tree, const char *string) { function walk (line 53) | void walk(node_t *node, callback_t callback) { function walk_sorted (line 59) | void walk_sorted(radix_tree_t *tree, callback_t callback) { FILE: other/clrs/12/problems/02.test.c function append (line 11) | void append(const char *s) { function TEST (line 15) | TEST(sort) { FILE: other/clrs/13/03/02.draw.py function dot (line 10) | def dot(tree): FILE: other/clrs/13/03/02.py class Color (line 4) | class Color(Enum): class Node (line 9) | class Node: method __init__ (line 10) | def __init__(self, color, key, parent, left, right): class Tree (line 18) | class Tree: method __init__ (line 19) | def __init__(self): method insert (line 27) | def insert(self, key): method fixup (line 53) | def fixup(self, z): method left_rotate (line 85) | def left_rotate(self, x): method right_rotate (line 104) | def right_rotate(self, y): FILE: other/clrs/13/04/03.draw.py function dot (line 10) | def dot(tree): FILE: other/clrs/13/04/03.py class Color (line 5) | class Color(Enum): class Node (line 10) | class Node: method __init__ (line 11) | def __init__(self, color, key, parent, left, right): method sexp (line 18) | def sexp(self, nil): method black_height (line 26) | def black_height(self, nil): class Tree (line 38) | class Tree: method __init__ (line 39) | def __init__(self): method __str__ (line 47) | def __str__(self): method search (line 50) | def search(self, key): method nodes (line 63) | def nodes(self): method insert (line 80) | def insert(self, key): method insert_fixup (line 106) | def insert_fixup(self, z): method delete (line 138) | def delete(self, z): method delete_fixup (line 166) | def delete_fixup(self, x): method minimum (line 219) | def minimum(self, node): method transplant (line 225) | def transplant(self, u, v): method left_rotate (line 234) | def left_rotate(self, x): method right_rotate (line 253) | def right_rotate(self, y): FILE: other/clrs/13/04/03.test.py class RedBlackTest (line 9) | class RedBlackTest(unittest.TestCase): method generate (line 10) | def generate(self, m, n): method assertContains (line 15) | def assertContains(self, tree, numbers): method assertProperties (line 20) | def assertProperties(self, tree): method test_insertions (line 34) | def test_insertions(self): method test_properties (line 44) | def test_properties(self): method test_deletion (line 53) | def test_deletion(self): FILE: other/clrs/13/04/07.draw.py function dot (line 10) | def dot(tree): FILE: other/clrs/13/misc/red_black_tree.py class Color (line 5) | class Color(Enum): function other (line 13) | def other(direction): class Node (line 22) | class Node: method __init__ (line 23) | def __init__(self, color, key, parent, left, right, tree): method sexp (line 31) | def sexp(self): method black_height (line 41) | def black_height(self): method isRed (line 52) | def isRed(self): method isBlack (line 55) | def isBlack(self): method isNil (line 58) | def isNil(self): method isNotNil (line 61) | def isNotNil(self): method __bool__ (line 64) | def __bool__(self): method child (line 67) | def child(self, direction): method set_child (line 75) | def set_child(self, direction, child): method other (line 86) | def other(self, direction): method rotate (line 89) | def rotate(self, direction): method left_rotate (line 108) | def left_rotate(self): method right_rotate (line 111) | def right_rotate(self): method transplant (line 114) | def transplant(self, other): method set (line 123) | def set(self, parent=None, left=None, right=None, color=None): method minimum (line 133) | def minimum(self): class Tree (line 148) | class Tree: method __init__ (line 149) | def __init__(self): method __str__ (line 152) | def __str__(self): method search (line 155) | def search(self, key): method nodes (line 168) | def nodes(self): method insert (line 185) | def insert(self, key): method insert_fixup (line 209) | def insert_fixup(self, node): method delete (line 233) | def delete(self, key): method delete_fixup (line 264) | def delete_fixup(self, node): FILE: other/clrs/13/misc/red_black_tree_test.py class RedBlackTest (line 6) | class RedBlackTest(unittest.TestCase): method generate (line 7) | def generate(self, m, n): method assertContains (line 12) | def assertContains(self, tree, numbers): method assertProperties (line 17) | def assertProperties(self, tree): method test_insertions (line 30) | def test_insertions(self): method test_properties (line 40) | def test_properties(self): method test_deletion (line 49) | def test_deletion(self): FILE: other/clrs/13/problems/01.py class Color (line 5) | class Color(Enum): function other (line 16) | def other(direction): function isBlackOrNil (line 25) | def isBlackOrNil(node): class Node (line 29) | class Node: method __init__ (line 30) | def __init__(self, color, key, left=None, right=None): method __str__ (line 36) | def __str__(self): method isRed (line 41) | def isRed(self): method isBlack (line 44) | def isBlack(self): method child_direction (line 47) | def child_direction(self, child): method child (line 57) | def child(self, direction): method set_child (line 65) | def set_child(self, direction, child): method with_replaced_child (line 73) | def with_replaced_child(self, replacement, child): method replace_child (line 83) | def replace_child(self, replacement, child): method other (line 95) | def other(self, direction): method sexp (line 98) | def sexp(self): method copy (line 109) | def copy(self, key=UNCHANGED, color=UNCHANGED, left=UNCHANGED, right=U... method left_rotate (line 123) | def left_rotate(self): method right_rotate (line 127) | def right_rotate(self): method rotate (line 131) | def rotate(self, direction): method minimum_with_ancestors (line 141) | def minimum_with_ancestors(self): function update_ancestor_chain (line 162) | def update_ancestor_chain(inserted, replaced, ancestors): class Tree (line 177) | class Tree: method __init__ (line 178) | def __init__(self, root=None): method __str__ (line 181) | def __str__(self): method search (line 189) | def search(self, key): method black_heights (line 202) | def black_heights(self): method nodes (line 229) | def nodes(self): method insert (line 246) | def insert(self, key): method insert_fixup (line 275) | def insert_fixup(self, current, ancestors): method search_with_ancestors (line 315) | def search_with_ancestors(self, key): method delete (line 331) | def delete(self, key): method delete_fixup (line 372) | def delete_fixup(self, ancestors): FILE: other/clrs/13/problems/01.test.py function Red (line 9) | def Red(key, left=None, right=None): function Black (line 13) | def Black(key, left=None, right=None): class RedBlackTest (line 17) | class RedBlackTest(unittest.TestCase): method generate (line 18) | def generate(self, m, n): method assertContains (line 23) | def assertContains(self, tree, numbers): method assertDoesNotContain (line 28) | def assertDoesNotContain(self, tree, numbers): method assertInAndOut (line 32) | def assertInAndOut(self, tree, included, excluded): method assertProperties (line 36) | def assertProperties(self, tree): method test_simple_insertion (line 50) | def test_simple_insertion(self): method test_exercise_insertion_properties (line 69) | def test_exercise_insertion_properties(self): method test_insertions (line 81) | def test_insertions(self): method test_delete_empty (line 108) | def test_delete_empty(self): method test_exercise_deletion_properties (line 113) | def test_exercise_deletion_properties(self): method test_delete_fixup_case_1 (line 135) | def test_delete_fixup_case_1(self): method test_delete_fixup_case_2 (line 150) | def test_delete_fixup_case_2(self): method test_delete_fixup_case_3 (line 165) | def test_delete_fixup_case_3(self): method test_delete_fixup_case_4 (line 181) | def test_delete_fixup_case_4(self): method test_deletion (line 203) | def test_deletion(self): FILE: other/clrs/13/problems/03.py class Node (line 4) | class Node: method __init__ (line 5) | def __init__(self, key, height=-1, left=None, right=None): method __str__ (line 11) | def __str__(self): method left_rotate (line 20) | def left_rotate(self): method right_rotate (line 31) | def right_rotate(self): function height (line 45) | def height(node): class AVL (line 49) | class AVL: method __init__ (line 50) | def __init__(self): method __str__ (line 53) | def __str__(self): method nodes (line 61) | def nodes(self): method insert (line 76) | def insert(self, key): method search (line 103) | def search(self, key): FILE: other/clrs/13/problems/03.test.py class AVLTreeTest (line 9) | class AVLTreeTest(unittest.TestCase): method assertBinarySearchTreeProperties (line 10) | def assertBinarySearchTreeProperties(self, tree): method assertAVLProperties (line 17) | def assertAVLProperties(self, tree): method testInsertionWithLeftRotation (line 38) | def testInsertionWithLeftRotation(self): method testInsertionWithLeftRightRotation (line 48) | def testInsertionWithLeftRightRotation(self): method testInsertionWithRightRotation (line 58) | def testInsertionWithRightRotation(self): method testInsertionWithRightLeftRotation (line 68) | def testInsertionWithRightLeftRotation(self): method testInsertion (line 78) | def testInsertion(self): method testRandomInsertion (line 97) | def testRandomInsertion(self): FILE: other/clrs/13/problems/04.py class Node (line 4) | class Node: method __init__ (line 5) | def __init__(self, key, priority, left=None, right=None): method __str__ (line 11) | def __str__(self): method left_rotate (line 20) | def left_rotate(self): method right_rotate (line 28) | def right_rotate(self): class Treap (line 39) | class Treap: method __init__ (line 40) | def __init__(self): method __str__ (line 43) | def __str__(self): method nodes (line 51) | def nodes(self): method insert (line 66) | def insert(self, key, priority=None): method search (line 84) | def search(self, key): FILE: other/clrs/13/problems/04.test.py class TreapTest (line 9) | class TreapTest(unittest.TestCase): method assertBinarySearchTreeProperties (line 10) | def assertBinarySearchTreeProperties(self, tree): method assertTreapProperties (line 17) | def assertTreapProperties(self, treap): method testInsertion (line 24) | def testInsertion(self): method testSameTreapWithExample (line 34) | def testSameTreapWithExample(self): method testRandomTreap (line 55) | def testRandomTreap(self): FILE: other/clrs/14/01/03.py class Color (line 5) | class Color(Enum): function other (line 13) | def other(direction): class Node (line 22) | class Node: method __init__ (line 23) | def __init__(self, color, key, parent, left, right, tree, size): method sexp (line 32) | def sexp(self): method black_height (line 42) | def black_height(self): method isRed (line 53) | def isRed(self): method isBlack (line 56) | def isBlack(self): method isNil (line 59) | def isNil(self): method isNotNil (line 62) | def isNotNil(self): method __bool__ (line 65) | def __bool__(self): method child (line 68) | def child(self, direction): method set_child (line 76) | def set_child(self, direction, child): method other (line 87) | def other(self, direction): method rotate (line 90) | def rotate(self, direction): method left_rotate (line 112) | def left_rotate(self): method right_rotate (line 115) | def right_rotate(self): method transplant (line 118) | def transplant(self, other): method set (line 127) | def set(self, parent=None, left=None, right=None, color=None): method minimum (line 137) | def minimum(self): method select (line 145) | def select(self, i): method rank (line 160) | def rank(self): class Tree (line 179) | class Tree: method __init__ (line 180) | def __init__(self): method __str__ (line 183) | def __str__(self): method search (line 186) | def search(self, key): method nodes (line 199) | def nodes(self): method select (line 216) | def select(self, i): method insert (line 219) | def insert(self, key): method insert_fixup (line 245) | def insert_fixup(self, node): method delete (line 269) | def delete(self, key): method delete_fixup (line 310) | def delete_fixup(self, node): FILE: other/clrs/14/01/03.test.py class OrderStatisticTreeTest (line 9) | class OrderStatisticTreeTest(unittest.TestCase): method test_rank_when_inserting (line 10) | def test_rank_when_inserting(self): method test_rank_when_deleting (line 24) | def test_rank_when_deleting(self): method generate (line 49) | def generate(self, m, n): method assertContains (line 54) | def assertContains(self, tree, numbers): method assertProperties (line 59) | def assertProperties(self, tree): method test_insertions (line 72) | def test_insertions(self): method test_properties (line 82) | def test_properties(self): method test_deletion (line 91) | def test_deletion(self): FILE: other/clrs/14/01/04.py class Color (line 5) | class Color(Enum): function other (line 13) | def other(direction): class Node (line 22) | class Node: method __init__ (line 23) | def __init__(self, color, key, parent, left, right, tree, size): method sexp (line 32) | def sexp(self): method black_height (line 42) | def black_height(self): method isRed (line 53) | def isRed(self): method isBlack (line 56) | def isBlack(self): method isNil (line 59) | def isNil(self): method isNotNil (line 62) | def isNotNil(self): method __bool__ (line 65) | def __bool__(self): method child (line 68) | def child(self, direction): method set_child (line 76) | def set_child(self, direction, child): method other (line 87) | def other(self, direction): method rotate (line 90) | def rotate(self, direction): method left_rotate (line 112) | def left_rotate(self): method right_rotate (line 115) | def right_rotate(self): method transplant (line 118) | def transplant(self, other): method set (line 127) | def set(self, parent=None, left=None, right=None, color=None): method minimum (line 137) | def minimum(self): method select (line 145) | def select(self, i): method rank (line 160) | def rank(self): method key_rank (line 172) | def key_rank(self, key): class Tree (line 187) | class Tree: method __init__ (line 188) | def __init__(self): method __str__ (line 191) | def __str__(self): method search (line 194) | def search(self, key): method key_rank (line 207) | def key_rank(self, key): method nodes (line 210) | def nodes(self): method select (line 227) | def select(self, i): method insert (line 230) | def insert(self, key): method insert_fixup (line 256) | def insert_fixup(self, node): method delete (line 280) | def delete(self, key): method delete_fixup (line 321) | def delete_fixup(self, node): FILE: other/clrs/14/01/04.test.py class OrderStatisticTreeTest (line 9) | class OrderStatisticTreeTest(unittest.TestCase): method test_key_rank (line 10) | def test_key_rank(self): method test_rank_when_inserting (line 33) | def test_rank_when_inserting(self): method test_rank_when_deleting (line 47) | def test_rank_when_deleting(self): method generate (line 72) | def generate(self, m, n): method assertContains (line 77) | def assertContains(self, tree, numbers): method assertProperties (line 82) | def assertProperties(self, tree): method test_insertions (line 95) | def test_insertions(self): method test_properties (line 105) | def test_properties(self): method test_deletion (line 114) | def test_deletion(self): FILE: other/clrs/14/01/05.py class Color (line 5) | class Color(Enum): function other (line 13) | def other(direction): class Node (line 22) | class Node: method __init__ (line 23) | def __init__(self, color, key, parent, left, right, tree, size): method sexp (line 32) | def sexp(self): method black_height (line 42) | def black_height(self): method isRed (line 53) | def isRed(self): method isBlack (line 56) | def isBlack(self): method isNil (line 59) | def isNil(self): method isNotNil (line 62) | def isNotNil(self): method __bool__ (line 65) | def __bool__(self): method child (line 68) | def child(self, direction): method set_child (line 76) | def set_child(self, direction, child): method other (line 87) | def other(self, direction): method rotate (line 90) | def rotate(self, direction): method left_rotate (line 112) | def left_rotate(self): method right_rotate (line 115) | def right_rotate(self): method transplant (line 118) | def transplant(self, other): method set (line 127) | def set(self, parent=None, left=None, right=None, color=None): method minimum (line 137) | def minimum(self): method select (line 145) | def select(self, i): method rank (line 160) | def rank(self): method key_rank (line 172) | def key_rank(self, key): method nth_successor (line 180) | def nth_successor(self, n): class Tree (line 202) | class Tree: method __init__ (line 203) | def __init__(self): method __str__ (line 206) | def __str__(self): method search (line 209) | def search(self, key): method key_rank (line 222) | def key_rank(self, key): method nodes (line 225) | def nodes(self): method select (line 242) | def select(self, i): method insert (line 245) | def insert(self, key): method insert_fixup (line 271) | def insert_fixup(self, node): method delete (line 295) | def delete(self, key): method delete_fixup (line 336) | def delete_fixup(self, node): FILE: other/clrs/14/01/05.test.py class OrderStatisticTreeTest (line 9) | class OrderStatisticTreeTest(unittest.TestCase): method test_nth_successor (line 10) | def test_nth_successor(self): method test_key_rank (line 34) | def test_key_rank(self): method test_rank_when_inserting (line 57) | def test_rank_when_inserting(self): method test_rank_when_deleting (line 71) | def test_rank_when_deleting(self): method generate (line 96) | def generate(self, m, n): method assertContains (line 101) | def assertContains(self, tree, numbers): method assertProperties (line 106) | def assertProperties(self, tree): method test_insertions (line 119) | def test_insertions(self): method test_properties (line 129) | def test_properties(self): method test_deletion (line 138) | def test_deletion(self): FILE: other/clrs/14/01/06.py class Color (line 5) | class Color(Enum): function other (line 13) | def other(direction): class Node (line 22) | class Node: method __init__ (line 23) | def __init__(self, color, key, parent, left, right, tree, rank=0): method sexp (line 32) | def sexp(self): method black_height (line 42) | def black_height(self): method isRed (line 53) | def isRed(self): method isBlack (line 56) | def isBlack(self): method isNil (line 59) | def isNil(self): method isNotNil (line 62) | def isNotNil(self): method __bool__ (line 65) | def __bool__(self): method child (line 68) | def child(self, direction): method set_child (line 76) | def set_child(self, direction, child): method other (line 87) | def other(self, direction): method rotate (line 90) | def rotate(self, direction): method depth (line 114) | def depth(self): method left_rotate (line 124) | def left_rotate(self): method right_rotate (line 127) | def right_rotate(self): method transplant (line 130) | def transplant(self, other): method set (line 139) | def set(self, parent=None, left=None, right=None, color=None): method minimum (line 149) | def minimum(self): method select (line 157) | def select(self, i): method rank_in_tree (line 169) | def rank_in_tree(self): class Tree (line 187) | class Tree: method __init__ (line 188) | def __init__(self): method __str__ (line 191) | def __str__(self): method display (line 194) | def display(self): method search (line 213) | def search(self, key): method nodes (line 226) | def nodes(self): method select (line 243) | def select(self, i): method insert (line 246) | def insert(self, key): method insert_fixup (line 271) | def insert_fixup(self, node): method delete (line 295) | def delete(self, key): method delete_fixup (line 337) | def delete_fixup(self, node): FILE: other/clrs/14/01/06.test.py class OrderStatisticTreeTest (line 9) | class OrderStatisticTreeTest(unittest.TestCase): method test_rank_when_inserting (line 10) | def test_rank_when_inserting(self): method test_rank_when_deleting (line 24) | def test_rank_when_deleting(self): method generate (line 49) | def generate(self, m, n): method assertContains (line 54) | def assertContains(self, tree, numbers): method assertProperties (line 59) | def assertProperties(self, tree): method test_insertions (line 72) | def test_insertions(self): method test_properties (line 82) | def test_properties(self): method test_deletion (line 91) | def test_deletion(self): FILE: other/clrs/14/01/07.py function inversions (line 5) | def inversions(array): class Color (line 15) | class Color(Enum): function other (line 23) | def other(direction): class Node (line 32) | class Node: method __init__ (line 33) | def __init__(self, color, key, parent, left, right, tree, size): method sexp (line 42) | def sexp(self): method black_height (line 52) | def black_height(self): method isRed (line 63) | def isRed(self): method isBlack (line 66) | def isBlack(self): method isNil (line 69) | def isNil(self): method isNotNil (line 72) | def isNotNil(self): method __bool__ (line 75) | def __bool__(self): method child (line 78) | def child(self, direction): method set_child (line 86) | def set_child(self, direction, child): method other (line 97) | def other(self, direction): method rotate (line 100) | def rotate(self, direction): method left_rotate (line 122) | def left_rotate(self): method right_rotate (line 125) | def right_rotate(self): method transplant (line 128) | def transplant(self, other): method set (line 137) | def set(self, parent=None, left=None, right=None, color=None): method minimum (line 147) | def minimum(self): method select (line 155) | def select(self, i): method rank (line 170) | def rank(self): class Tree (line 189) | class Tree: method __init__ (line 190) | def __init__(self): method __str__ (line 193) | def __str__(self): method search (line 196) | def search(self, key): method rank (line 209) | def rank(self, key): method nodes (line 212) | def nodes(self): method select (line 229) | def select(self, i): method insert (line 232) | def insert(self, key): method insert_fixup (line 260) | def insert_fixup(self, node): method delete (line 284) | def delete(self, key): method delete_fixup (line 325) | def delete_fixup(self, node): FILE: other/clrs/14/01/07.test.py function count_inversions (line 9) | def count_inversions(numbers): class OrderStatisticTreeTest (line 18) | class OrderStatisticTreeTest(unittest.TestCase): method test_inversions (line 19) | def test_inversions(self): FILE: other/clrs/14/01/08.py function count_chords (line 5) | def count_chords(chords): class Color (line 32) | class Color(Enum): function other (line 40) | def other(direction): class Node (line 49) | class Node: method __init__ (line 50) | def __init__(self, color, key, parent, left, right, tree, size): method sexp (line 59) | def sexp(self): method black_height (line 69) | def black_height(self): method isRed (line 80) | def isRed(self): method isBlack (line 83) | def isBlack(self): method isNil (line 86) | def isNil(self): method isNotNil (line 89) | def isNotNil(self): method __bool__ (line 92) | def __bool__(self): method child (line 95) | def child(self, direction): method set_child (line 103) | def set_child(self, direction, child): method other (line 114) | def other(self, direction): method rotate (line 117) | def rotate(self, direction): method left_rotate (line 139) | def left_rotate(self): method right_rotate (line 142) | def right_rotate(self): method transplant (line 145) | def transplant(self, other): method set (line 154) | def set(self, parent=None, left=None, right=None, color=None): method minimum (line 164) | def minimum(self): method select (line 172) | def select(self, i): method rank (line 187) | def rank(self): class Tree (line 206) | class Tree: method __init__ (line 207) | def __init__(self): method __str__ (line 210) | def __str__(self): method size (line 213) | def size(self): method search (line 216) | def search(self, key): method nodes (line 229) | def nodes(self): method select (line 246) | def select(self, i): method insert (line 249) | def insert(self, key): method insert_fixup (line 275) | def insert_fixup(self, node): method delete (line 299) | def delete(self, key): method delete_fixup (line 340) | def delete_fixup(self, node): FILE: other/clrs/14/01/08.test.py function naive_chord_count (line 9) | def naive_chord_count(chords): class OrderStatisticTreeTest (line 29) | class OrderStatisticTreeTest(unittest.TestCase): method test_diameters (line 30) | def test_diameters(self): method test_random_circle (line 60) | def test_random_circle(self): FILE: other/clrs/14/02/01.py class Color (line 5) | class Color(Enum): function other (line 13) | def other(direction): class Node (line 22) | class Node: method __init__ (line 23) | def __init__(self, color, key, parent, left, right, tree, size, pred, ... method sexp (line 34) | def sexp(self): method black_height (line 44) | def black_height(self): method isRed (line 55) | def isRed(self): method isBlack (line 58) | def isBlack(self): method isNil (line 61) | def isNil(self): method isNotNil (line 64) | def isNotNil(self): method __bool__ (line 67) | def __bool__(self): method child (line 70) | def child(self, direction): method set_child (line 78) | def set_child(self, direction, child): method other (line 89) | def other(self, direction): method rotate (line 92) | def rotate(self, direction): method left_rotate (line 114) | def left_rotate(self): method right_rotate (line 117) | def right_rotate(self): method transplant (line 120) | def transplant(self, other): method set (line 129) | def set(self, parent=None, left=None, right=None, color=None, succ=Non... method minimum (line 143) | def minimum(self): method select (line 151) | def select(self, i): method rank (line 166) | def rank(self): class Tree (line 185) | class Tree: method __init__ (line 186) | def __init__(self): method __str__ (line 191) | def __str__(self): method search (line 194) | def search(self, key): method nodes (line 207) | def nodes(self): method select (line 224) | def select(self, i): method insert (line 227) | def insert(self, key): method insert_fixup (line 279) | def insert_fixup(self, node): method delete (line 303) | def delete(self, key): method delete_fixup (line 353) | def delete_fixup(self, node): FILE: other/clrs/14/02/01.test.py class OrderStatisticTreeTest (line 9) | class OrderStatisticTreeTest(unittest.TestCase): method test_things (line 10) | def test_things(self): method test_rank_when_inserting (line 28) | def test_rank_when_inserting(self): method test_rank_when_deleting (line 42) | def test_rank_when_deleting(self): method generate (line 67) | def generate(self, m, n): method assertContains (line 72) | def assertContains(self, tree, numbers): method assertProperties (line 77) | def assertProperties(self, tree): method assertForwardWalk (line 90) | def assertForwardWalk(self, tree, numbers): method assertBackwardWalk (line 101) | def assertBackwardWalk(self, tree, numbers): method test_insertions (line 112) | def test_insertions(self): method test_properties (line 124) | def test_properties(self): method test_deletion (line 135) | def test_deletion(self): FILE: other/clrs/14/03/01.py class Interval (line 5) | class Interval: method __init__ (line 6) | def __init__(self, low, high): method __eq__ (line 11) | def __eq__(self, other): method __contains__ (line 15) | def __contains__(self, n): method __repr__ (line 18) | def __repr__(self): method overlaps (line 23) | def overlaps(self, other): class Color (line 27) | class Color(Enum): function other (line 35) | def other(direction): function max_maybe (line 43) | def max_maybe(*args): class Node (line 46) | class Node: method __init__ (line 47) | def __init__(self, color, interval, parent, left, right, max, tree): method sexp (line 56) | def sexp(self): method black_height (line 66) | def black_height(self): method isRed (line 77) | def isRed(self): method isBlack (line 80) | def isBlack(self): method isNil (line 83) | def isNil(self): method isNotNil (line 86) | def isNotNil(self): method __bool__ (line 89) | def __bool__(self): method child (line 92) | def child(self, direction): method set_child (line 100) | def set_child(self, direction, child): method other (line 111) | def other(self, direction): method rotate (line 114) | def rotate(self, direction): method left_rotate (line 145) | def left_rotate(self): method right_rotate (line 148) | def right_rotate(self): method transplant (line 151) | def transplant(self, other): method set (line 160) | def set(self, parent=None, left=None, right=None, color=None): method minimum (line 170) | def minimum(self): class IntervalTree (line 185) | class IntervalTree: method __init__ (line 186) | def __init__(self): method __str__ (line 189) | def __str__(self): method find (line 192) | def find(self, interval): method search (line 205) | def search(self, interval): method nodes (line 218) | def nodes(self): method insert (line 235) | def insert(self, interval): method max_fixup (line 261) | def max_fixup(self, node): method insert_fixup (line 271) | def insert_fixup(self, node): method delete (line 295) | def delete(self, interval): method delete_fixup (line 333) | def delete_fixup(self, node): FILE: other/clrs/14/03/01.test.py class IntervalTest (line 9) | class IntervalTest(unittest.TestCase): method test_contains (line 10) | def test_contains(self): method test_overlaps (line 18) | def test_overlaps(self): class IntervalTreeTest (line 27) | class IntervalTreeTest(unittest.TestCase): method test_simple_interval_tree (line 28) | def test_simple_interval_tree(self): method test_overlapping (line 65) | def test_overlapping(self): method test_properties (line 75) | def test_properties(self): method assertProperties (line 104) | def assertProperties(self, tree): FILE: other/clrs/14/03/04.py class Interval (line 5) | class Interval: method __init__ (line 6) | def __init__(self, low, high): method __eq__ (line 11) | def __eq__(self, other): method __hash__ (line 15) | def __hash__(self): method __contains__ (line 18) | def __contains__(self, n): method __repr__ (line 21) | def __repr__(self): method overlaps (line 26) | def overlaps(self, other): class Color (line 30) | class Color(Enum): function other (line 38) | def other(direction): function max_maybe (line 46) | def max_maybe(*args): class Node (line 49) | class Node: method __init__ (line 50) | def __init__(self, color, interval, parent, left, right, max, tree): method sexp (line 59) | def sexp(self): method black_height (line 69) | def black_height(self): method isRed (line 80) | def isRed(self): method isBlack (line 83) | def isBlack(self): method isNil (line 86) | def isNil(self): method isNotNil (line 89) | def isNotNil(self): method __bool__ (line 92) | def __bool__(self): method child (line 95) | def child(self, direction): method set_child (line 103) | def set_child(self, direction, child): method other (line 114) | def other(self, direction): method rotate (line 117) | def rotate(self, direction): method left_rotate (line 148) | def left_rotate(self): method right_rotate (line 151) | def right_rotate(self): method transplant (line 154) | def transplant(self, other): method set (line 163) | def set(self, parent=None, left=None, right=None, color=None): method minimum (line 173) | def minimum(self): class IntervalTree (line 188) | class IntervalTree: method __init__ (line 189) | def __init__(self): method __str__ (line 192) | def __str__(self): method find (line 195) | def find(self, interval): method search (line 208) | def search(self, interval): method search_all (line 221) | def search_all(self, interval): method nodes (line 239) | def nodes(self): method insert (line 256) | def insert(self, interval): method max_fixup (line 282) | def max_fixup(self, node): method insert_fixup (line 292) | def insert_fixup(self, node): method delete (line 316) | def delete(self, interval): method delete_fixup (line 354) | def delete_fixup(self, node): FILE: other/clrs/14/03/04.test.py class IntervalTreeTest (line 10) | class IntervalTreeTest(unittest.TestCase): method test_search_all (line 11) | def test_search_all(self): FILE: other/clrs/14/03/06.py class Color (line 5) | class Color(Enum): function other (line 13) | def other(direction): class Extra (line 22) | class Extra: method __init__ (line 23) | def __init__(self, minimum, maximum, gap): class Node (line 29) | class Node: method __init__ (line 30) | def __init__(self, color, key, parent, left, right, extra, tree): method sexp (line 39) | def sexp(self): method black_height (line 49) | def black_height(self): method isRed (line 60) | def isRed(self): method isBlack (line 63) | def isBlack(self): method isNil (line 66) | def isNil(self): method isNotNil (line 69) | def isNotNil(self): method __bool__ (line 72) | def __bool__(self): method child (line 75) | def child(self, direction): method set_child (line 83) | def set_child(self, direction, child): method other (line 94) | def other(self, direction): method rotate (line 97) | def rotate(self, direction): method left_rotate (line 119) | def left_rotate(self): method right_rotate (line 122) | def right_rotate(self): method transplant (line 125) | def transplant(self, other): method set (line 134) | def set(self, parent=None, left=None, right=None, color=None): method minimum (line 144) | def minimum(self): method maximum (line 152) | def maximum(self): method recalculate (line 160) | def recalculate(self): class MinGapTree (line 179) | class MinGapTree: method __init__ (line 180) | def __init__(self): method __str__ (line 183) | def __str__(self): method min_gap (line 186) | def min_gap(self): method search (line 189) | def search(self, key): method nodes (line 202) | def nodes(self): method insert (line 219) | def insert(self, key): method insert_fixup (line 246) | def insert_fixup(self, node): method delete (line 270) | def delete(self, key): method delete_fixup (line 307) | def delete_fixup(self, node): method extras_fixup (line 340) | def extras_fixup(self, node): FILE: other/clrs/14/03/06.test.py class MinGapTreeTest (line 10) | class MinGapTreeTest(unittest.TestCase): method test_example_from_book (line 11) | def test_example_from_book(self): method generate (line 33) | def generate(self, m, n): method assertContains (line 38) | def assertContains(self, tree, numbers): method assertProperties (line 43) | def assertProperties(self, tree): method test_insertions (line 59) | def test_insertions(self): method test_properties (line 69) | def test_properties(self): method test_deletion (line 78) | def test_deletion(self): FILE: other/clrs/14/03/07.py function overlap (line 4) | def overlap(rectangles): class Rectangle (line 30) | class Rectangle: method __init__ (line 31) | def __init__(self, top, bottom, left, right): method overlaps (line 40) | def overlaps(self, other): method __repr__ (line 44) | def __repr__(self): class Interval (line 48) | class Interval: method __init__ (line 49) | def __init__(self, low, high): method __eq__ (line 54) | def __eq__(self, other): method __contains__ (line 58) | def __contains__(self, n): method __repr__ (line 61) | def __repr__(self): method overlaps (line 66) | def overlaps(self, other): class Color (line 70) | class Color(Enum): function other (line 78) | def other(direction): function max_maybe (line 86) | def max_maybe(*args): class Node (line 89) | class Node: method __init__ (line 90) | def __init__(self, color, interval, parent, left, right, max, tree): method sexp (line 99) | def sexp(self): method black_height (line 109) | def black_height(self): method isRed (line 120) | def isRed(self): method isBlack (line 123) | def isBlack(self): method isNil (line 126) | def isNil(self): method isNotNil (line 129) | def isNotNil(self): method __bool__ (line 132) | def __bool__(self): method child (line 135) | def child(self, direction): method set_child (line 143) | def set_child(self, direction, child): method other (line 154) | def other(self, direction): method rotate (line 157) | def rotate(self, direction): method left_rotate (line 188) | def left_rotate(self): method right_rotate (line 191) | def right_rotate(self): method transplant (line 194) | def transplant(self, other): method set (line 203) | def set(self, parent=None, left=None, right=None, color=None): method minimum (line 213) | def minimum(self): class IntervalTree (line 228) | class IntervalTree: method __init__ (line 229) | def __init__(self): method __str__ (line 232) | def __str__(self): method find (line 235) | def find(self, interval): method search (line 248) | def search(self, interval): method nodes (line 261) | def nodes(self): method insert (line 278) | def insert(self, interval): method max_fixup (line 304) | def max_fixup(self, node): method insert_fixup (line 314) | def insert_fixup(self, node): method delete (line 338) | def delete(self, interval): method delete_fixup (line 376) | def delete_fixup(self, node): FILE: other/clrs/14/03/07.test.py function overlapper (line 10) | def overlapper(rectangles): class OverlapingRectanglesTest (line 20) | class OverlapingRectanglesTest(unittest.TestCase): method test_simple_cases (line 21) | def test_simple_cases(self): method test_randomly_generated (line 36) | def test_randomly_generated(self): FILE: other/clrs/14/misc/augmentable_tree.py class Color (line 5) | class Color(Enum): function other (line 13) | def other(direction): class Node (line 22) | class Node: method __init__ (line 23) | def __init__(self, color, key, parent, left, right, tree): method sexp (line 31) | def sexp(self): method __str__ (line 39) | def __str__(self): method black_height (line 42) | def black_height(self): method isRed (line 53) | def isRed(self): method isBlack (line 56) | def isBlack(self): method isNil (line 59) | def isNil(self): method isNotNil (line 62) | def isNotNil(self): method __bool__ (line 65) | def __bool__(self): method child (line 68) | def child(self, direction): method set_child (line 76) | def set_child(self, direction, child): method other (line 87) | def other(self, direction): method rotate (line 90) | def rotate(self, direction): method left_rotate (line 112) | def left_rotate(self): method right_rotate (line 115) | def right_rotate(self): method transplant (line 118) | def transplant(self, other): method set (line 127) | def set(self, parent=None, left=None, right=None, color=None): method minimum (line 137) | def minimum(self): class AugmentableTree (line 152) | class AugmentableTree: method __init__ (line 153) | def __init__(self): method __str__ (line 156) | def __str__(self): method search (line 159) | def search(self, key): method nodes (line 172) | def nodes(self): method insert (line 189) | def insert(self, key): method recalculate_ancestors (line 217) | def recalculate_ancestors(self, node): method insert_fixup (line 222) | def insert_fixup(self, node): method delete (line 246) | def delete(self, key): method delete_fixup (line 283) | def delete_fixup(self, node): FILE: other/clrs/14/misc/augmentable_tree_test.py class Interval (line 6) | class Interval: method __init__ (line 7) | def __init__(self, low, high): method __eq__ (line 12) | def __eq__(self, other): method __lt__ (line 16) | def __lt__(self, other): method __contains__ (line 19) | def __contains__(self, n): method __repr__ (line 22) | def __repr__(self): method overlaps (line 27) | def overlaps(self, other): function max_maybe (line 31) | def max_maybe(*args): class IntervalTree (line 35) | class IntervalTree(AugmentableTree): method augment_node (line 36) | def augment_node(self, node): method recalculate_node (line 40) | def recalculate_node(self, node): method find (line 47) | def find(self, interval): class IntervalTreeTest (line 61) | class IntervalTreeTest(unittest.TestCase): method test_simple_interval_tree (line 62) | def test_simple_interval_tree(self): method test_overlapping (line 99) | def test_overlapping(self): method test_properties (line 109) | def test_properties(self): method assertProperties (line 138) | def assertProperties(self, tree): function node_size (line 158) | def node_size(node): function select_node (line 161) | def select_node(node, i): function rank_node (line 174) | def rank_node(node): class OrderStatisticTree (line 185) | class OrderStatisticTree(AugmentableTree): method augment_node (line 186) | def augment_node(self, node): method recalculate_node (line 191) | def recalculate_node(self, node): method select (line 194) | def select(self, i): class OrderStatisticTreeTest (line 198) | class OrderStatisticTreeTest(unittest.TestCase): method test_rank_when_inserting (line 199) | def test_rank_when_inserting(self): method test_rank_when_deleting (line 213) | def test_rank_when_deleting(self): method generate (line 238) | def generate(self, m, n): method assertContains (line 243) | def assertContains(self, tree, numbers): method assertProperties (line 248) | def assertProperties(self, tree): method test_insertions (line 261) | def test_insertions(self): method test_properties (line 271) | def test_properties(self): method test_deletion (line 280) | def test_deletion(self): FILE: other/clrs/14/misc/interval_tree.py class Interval (line 5) | class Interval: method __init__ (line 6) | def __init__(self, low, high): method __eq__ (line 11) | def __eq__(self, other): method __contains__ (line 15) | def __contains__(self, n): method __repr__ (line 18) | def __repr__(self): method overlaps (line 23) | def overlaps(self, other): class Color (line 27) | class Color(Enum): function other (line 35) | def other(direction): function max_maybe (line 43) | def max_maybe(*args): class Node (line 46) | class Node: method __init__ (line 47) | def __init__(self, color, interval, parent, left, right, max, tree): method sexp (line 56) | def sexp(self): method black_height (line 66) | def black_height(self): method isRed (line 77) | def isRed(self): method isBlack (line 80) | def isBlack(self): method isNil (line 83) | def isNil(self): method isNotNil (line 86) | def isNotNil(self): method __bool__ (line 89) | def __bool__(self): method child (line 92) | def child(self, direction): method set_child (line 100) | def set_child(self, direction, child): method other (line 111) | def other(self, direction): method rotate (line 114) | def rotate(self, direction): method left_rotate (line 145) | def left_rotate(self): method right_rotate (line 148) | def right_rotate(self): method transplant (line 151) | def transplant(self, other): method set (line 160) | def set(self, parent=None, left=None, right=None, color=None): method minimum (line 170) | def minimum(self): class IntervalTree (line 185) | class IntervalTree: method __init__ (line 186) | def __init__(self): method __str__ (line 189) | def __str__(self): method find (line 192) | def find(self, interval): method search (line 205) | def search(self, interval): method nodes (line 218) | def nodes(self): method insert (line 235) | def insert(self, interval): method max_fixup (line 261) | def max_fixup(self, node): method insert_fixup (line 271) | def insert_fixup(self, node): method delete (line 295) | def delete(self, interval): method delete_fixup (line 332) | def delete_fixup(self, node): FILE: other/clrs/14/misc/interval_tree_test.py class IntervalTest (line 6) | class IntervalTest(unittest.TestCase): method test_contains (line 7) | def test_contains(self): method test_overlaps (line 15) | def test_overlaps(self): class IntervalTreeTest (line 24) | class IntervalTreeTest(unittest.TestCase): method test_simple_interval_tree (line 25) | def test_simple_interval_tree(self): method test_overlapping (line 62) | def test_overlapping(self): method test_properties (line 72) | def test_properties(self): method assertProperties (line 101) | def assertProperties(self, tree): FILE: other/clrs/14/misc/order_statistic_tree.py function node_size (line 3) | def node_size(node): function select_node (line 6) | def select_node(node, i): function rank_node (line 19) | def rank_node(node): class OrderStatisticTree (line 30) | class OrderStatisticTree(AugmentableTree): method augment_node (line 31) | def augment_node(self, node): method recalculate_node (line 36) | def recalculate_node(self, node): method select (line 39) | def select(self, i): FILE: other/clrs/14/problems/01.py class Endpoint (line 6) | class Endpoint: method __init__ (line 7) | def __init__(self, value, weight): self.value, self.weight = value, we... method __lt__ (line 8) | def __lt__(self, other): return (self.value, -self.weight) < (other.va... method __eq__ (line 9) | def __eq__(self, other): return (self.value, self.weight) == (other.va... method isLow (line 10) | def isLow(self): return self.weight == 1 function weight (line 13) | def weight(node): function optimal (line 17) | def optimal(node): class OverlapTree (line 21) | class OverlapTree(AugmentableTree): method __init__ (line 22) | def __init__(self, intervals = []): method augment_node (line 28) | def augment_node(self, node): method recalculate_node (line 33) | def recalculate_node(self, node): method max_overlap (line 46) | def max_overlap(self): method insert_interval (line 49) | def insert_interval(self, interval): method delete_interval (line 53) | def delete_interval(self, interval): FILE: other/clrs/14/problems/01.test.py class Interval (line 7) | class Interval: method __init__ (line 8) | def __init__(self, low, high): method elements (line 12) | def elements(self): function naive_max_overlap (line 16) | def naive_max_overlap(intervals): class OverlapTreeTest (line 28) | class OverlapTreeTest(unittest.TestCase): method test_simple_case (line 29) | def test_simple_case(self): method test_random_case (line 41) | def test_random_case(self): FILE: other/clrs/14/problems/02.py function josephus (line 6) | def josephus(n, m): FILE: other/clrs/14/problems/02.test.py function naive_josephus (line 9) | def naive_josephus(n, m): class JosephusTest (line 22) | class JosephusTest(unittest.TestCase): method test_simple_permutation (line 23) | def test_simple_permutation(self): method test_permutations (line 26) | def test_permutations(self): FILE: other/clrs/15/01/03.py function cut_rod (line 1) | def cut_rod(length, prices, cut_cost=0): FILE: other/clrs/15/01/03.test.py class RodCuttingTest (line 6) | class RodCuttingTest(unittest.TestCase): method setUp (line 7) | def setUp(self): method test_cutting_without_a_cost (line 10) | def test_cutting_without_a_cost(self): method test_cutting_with_a_cost (line 23) | def test_cutting_with_a_cost(self): method test_equivalence_to_costless (line 27) | def test_equivalence_to_costless(self): FILE: other/clrs/15/01/04.py function memoized_cut_rod (line 1) | def memoized_cut_rod(length, prices): FILE: other/clrs/15/01/04.test.py class MemoizedRodCuttingTest (line 6) | class MemoizedRodCuttingTest(unittest.TestCase): method setUp (line 7) | def setUp(self): method test_cutting_without_a_cost (line 10) | def test_cutting_without_a_cost(self): FILE: other/clrs/15/01/05.py function fibonacci (line 1) | def fibonacci(n): FILE: other/clrs/15/01/05.test.py class FibonacciTest (line 6) | class FibonacciTest(unittest.TestCase): method test_cutting_without_a_cost (line 7) | def test_cutting_without_a_cost(self): FILE: other/clrs/15/02/01.py function subscript (line 6) | def subscript(n): function order (line 17) | def order(dimensions): FILE: other/clrs/15/03/04.py function subscript (line 6) | def subscript(n): function optimal (line 17) | def optimal(choices, i, j): function order (line 26) | def order(dimensions): function greedy (line 50) | def greedy(dimensions): FILE: other/clrs/15/03/04.run.py function report (line 6) | def report(message, answers): FILE: other/clrs/15/04/01.py function lcs (line 1) | def lcs(x, y): FILE: other/clrs/15/04/02.py function lcs (line 1) | def lcs(x, y): FILE: other/clrs/15/04/02.test.py class LongestCommonSubsequenceTest (line 6) | class LongestCommonSubsequenceTest(unittest.TestCase): method test_lcs (line 7) | def test_lcs(self): FILE: other/clrs/15/04/03.py function lcs (line 1) | def lcs(x, y): FILE: other/clrs/15/04/03.test.py class LongestCommonSubsequenceTest (line 6) | class LongestCommonSubsequenceTest(unittest.TestCase): method test_lcs (line 7) | def test_lcs(self): FILE: other/clrs/15/04/04.py function lcs_twice (line 1) | def lcs_twice(x, y): function lcs_once_plus_const (line 25) | def lcs_once_plus_const(x, y): FILE: other/clrs/15/04/04.test.py class LongestCommonSubsequenceTest (line 6) | class LongestCommonSubsequenceTest(unittest.TestCase): method test_example_one (line 7) | def test_example_one(self): method test_example_two (line 14) | def test_example_two(self): FILE: other/clrs/15/04/05.py function mono (line 1) | def mono(items): FILE: other/clrs/15/04/05.test.py class LongestMonotonicallyIncreasingSubsequenceTest (line 6) | class LongestMonotonicallyIncreasingSubsequenceTest(unittest.TestCase): method test_examples (line 7) | def test_examples(self): FILE: other/clrs/15/04/06.py function mono (line 1) | def mono(items): FILE: other/clrs/15/04/06.test.py function quadratic (line 7) | def quadratic(items): class FasterLongestMonotonicallyIncreasingSubsequenceTest (line 30) | class FasterLongestMonotonicallyIncreasingSubsequenceTest(unittest.TestC... method test_examples (line 31) | def test_examples(self): method test_comparison (line 46) | def test_comparison(self): FILE: other/clrs/15/05/01.py function table (line 3) | def table(h, w): function optimal (line 6) | def optimal(p, q): function dump_tree (line 30) | def dump_tree(root): FILE: other/clrs/15/05/02.py function table (line 3) | def table(h, w): function optimal (line 6) | def optimal(p, q): function dump_tree (line 30) | def dump_tree(root): FILE: other/clrs/build/ext/debug_helpers.h function fprint_array (line 3) | void fprint_array(FILE *stream, int array[], int length) { FILE: other/clrs/build/ext/drawing.py function unique_number (line 9) | def unique_number(): class RedBlackTrees (line 15) | class RedBlackTrees: class Node (line 16) | class Node: method __init__ (line 17) | def __init__(self, value, left=None, right=None, label=None, extra=[]): method dot (line 25) | def dot(self, nils=True): method name (line 69) | def name(self): method node (line 72) | def node(self): method bfs (line 78) | def bfs(self): class Red (line 90) | class Red(Node): method attributes (line 91) | def attributes(self): class Black (line 94) | class Black(Node): method attributes (line 95) | def attributes(self): class Gray (line 98) | class Gray(Node): method attributes (line 99) | def attributes(self): function svg (line 103) | def svg(dot): function process (line 109) | def process(drawings): FILE: other/clrs/build/ext/test.h function test_initialize (line 23) | void test_initialize() { function test_report_assertion_error (line 35) | void test_report_assertion_error(const char *assertion_name) { function test_report_results (line 44) | int test_report_results() { function run_test (line 64) | void run_test(const char *name, void (*code)()) { function abort_test (line 78) | void abort_test() { function assert_same_arrays (line 96) | void assert_same_arrays(int a[], int b[], int l1, int l2) { function assert_equals (line 121) | void assert_equals(int a, int b) { function assert_true (line 136) | void assert_true(int v) { function assert_false (line 145) | void assert_false(int v) { function assert_null (line 164) | void assert_null(void *v) { function assert_not_null (line 173) | void assert_not_null(void *v) { function fail (line 192) | void fail(const char *message, ...) { FILE: other/clrs/build/lib/catalog.rb class Catalog (line 1) | class Catalog method locate (line 7) | def locate method initialize (line 12) | def initialize(root_dir) method chapters (line 16) | def chapters method solutions (line 20) | def solutions method positions (line 25) | def positions method previous (line 30) | def previous(solution) method next (line 34) | def next(solution) method load_solutions_and_positions (line 40) | def load_solutions_and_positions method find_chapters (line 61) | def find_chapters method find_sections (line 75) | def find_sections(chapter) method find_exercises (line 82) | def find_exercises(chapter, section) method find_problems (line 88) | def find_problems(chapter) method glob (line 97) | def glob(dir, pattern, extension = nil, &block) FILE: other/clrs/build/lib/chapter_number.rb class ChapterNumber (line 1) | class ChapterNumber method initialize (line 2) | def initialize(name) method name (line 10) | def name method short_name (line 18) | def short_name method inspect (line 22) | def inspect FILE: other/clrs/build/lib/exercise.rb class Exercise (line 1) | class Exercise method initialize (line 4) | def initialize(chapter, section, number) method components (line 10) | def components method name (line 14) | def name method title (line 18) | def title method location (line 22) | def location FILE: other/clrs/build/lib/generator.rb type Generator (line 1) | module Generator function generate (line 4) | def generate function copy_static_files (line 19) | def copy_static_files function generate_css (line 24) | def generate_css function generate_solutions (line 28) | def generate_solutions(catalog) function generate_catalog (line 45) | def generate_catalog(catalog) function generate_exercise (line 49) | def generate_exercise(exercise, catalog) function generate_problem (line 53) | def generate_problem(problem, catalog) function generate_drawings (line 57) | def generate_drawings(solution) function generate_graph (line 63) | def generate_graph(solution) function write_file (line 68) | def write_file(filename, content) FILE: other/clrs/build/lib/graph.rb type Graph (line 1) | module Graph function render_png (line 4) | def render_png(pathname) function render_svg (line 8) | def render_svg(pathname) function compile_to_svg (line 12) | def compile_to_svg(code) function list_drawings (line 20) | def list_drawings(pathname) function render_drawing (line 24) | def render_drawing(pathname, number) function run_draw (line 30) | def run_draw(pathname, *args) FILE: other/clrs/build/lib/problem.rb class Problem (line 1) | class Problem method initialize (line 4) | def initialize(chapter, number) method components (line 9) | def components method name (line 13) | def name method title (line 17) | def title method location (line 21) | def location FILE: other/clrs/build/lib/renderer.rb type Renderer (line 1) | module Renderer function render_catalog (line 4) | def render_catalog(catalog) function render_exercise (line 12) | def render_exercise(exercise, catalog = nil) function render_problem (line 23) | def render_problem(problem, catalog = nil) function render_code (line 34) | def render_code(path, language) function render_css (line 39) | def render_css function render_view (line 46) | def render_view(name, context, &block) function make_context (line 51) | def make_context(hash = {}) function markdown (line 59) | def markdown function process (line 66) | def process(markdown_code) class Markdown (line 72) | class Markdown < Redcarpet::Render::HTML method postprocess (line 73) | def postprocess(html) FILE: other/clrs/build/lib/runtimes.rb type Runtimes (line 1) | module Runtimes function for (line 4) | def for(language) FILE: other/clrs/build/lib/runtimes/c.rb type Runtimes (line 1) | module Runtimes type C (line 2) | module C function run_test (line 5) | def run_test(location, capture_output = false) function run (line 15) | def run(location, capture_output = false) function write_test_file (line 25) | def write_test_file(test_path, runner_path) function compile (line 48) | def compile(code_path, target_path) function execute (line 57) | def execute(executable_path, capture_output) FILE: other/clrs/build/lib/runtimes/python.rb type Runtimes (line 1) | module Runtimes type Python (line 2) | module Python function run (line 5) | def run(location, capture_output = false) function run_test (line 10) | def run_test(location, capture_output = false) function execute (line 17) | def execute(path, capture_output = false) FILE: other/clrs/build/lib/solution.rb type Solution (line 1) | module Solution function location_path (line 4) | def location_path function extension_exists? (line 8) | def extension_exists?(extension) function markdown_path (line 12) | def markdown_path function graph_path (line 16) | def graph_path function draw_path (line 20) | def draw_path function html_url (line 24) | def html_url function languages (line 28) | def languages function test_languages (line 34) | def test_languages function run_languages (line 40) | def run_languages function code? (line 46) | def code? function tested? (line 50) | def tested? function graph? (line 54) | def graph? function drawings? (line 58) | def drawings? function code_path (line 62) | def code_path(language) function test_path (line 66) | def test_path(language) function runner_path (line 70) | def runner_path(language) function displayed_drawings (line 74) | def displayed_drawings function run (line 78) | def run(language) function run_test (line 82) | def run_test(language) function run_and_capture_output (line 86) | def run_and_capture_output(language) function run_tests (line 90) | def run_tests function run_all (line 96) | def run_all FILE: ruby/understanding-computation/03/example.rb type Chapter03 (line 4) | module Chapter03 function generate_example (line 7) | def generate_example(base_path) FILE: ruby/understanding-computation/03/lib/dfa.rb class DFA (line 1) | class DFA < Struct.new(:current_state, :accept_states, :rulebook) method accepting? (line 2) | def accepting? method read_character (line 6) | def read_character(character) method read_string (line 10) | def read_string(string) FILE: ruby/understanding-computation/03/lib/dfa_design.rb class DFADesign (line 1) | class DFADesign < Struct.new(:start_state, :accept_states, :rulebook) method to_dfa (line 4) | def to_dfa method accepts? (line 8) | def accepts?(string) method reverse (line 12) | def reverse method minimize (line 29) | def minimize FILE: ruby/understanding-computation/03/lib/dfa_rulebook.rb class DFARulebook (line 1) | class DFARulebook < Struct.new(:rules) method next_state (line 2) | def next_state(state, character) method rule_for (line 6) | def rule_for(state, character) FILE: ruby/understanding-computation/03/lib/dot.rb type Dot (line 1) | module Dot type Design (line 2) | module Design function to_dot (line 3) | def to_dot type Rule (line 28) | module Rule function states (line 29) | def states function to_dot (line 33) | def to_dot function state_repr (line 43) | def state_repr function next_state_repr (line 47) | def next_state_repr function repr (line 53) | def repr(state) function draw (line 58) | def self.draw(design, file_base, open=false) function repr (line 67) | def self.repr(state) function reset_gensym (line 75) | def self.reset_gensym function shorten_set (line 80) | def self.shorten_set(set_of_sets) function gensym (line 93) | def self.gensym(state) FILE: ruby/understanding-computation/03/lib/fa_rule.rb class FARule (line 1) | class FARule < Struct.new(:state, :character, :next_state) method applies_to? (line 4) | def applies_to?(state, character) method follow (line 9) | def follow method inspect (line 13) | def inspect FILE: ruby/understanding-computation/03/lib/nfa.rb class NFA (line 1) | class NFA < Struct.new(:current_states, :accept_states, :rulebook) method accepting? (line 2) | def accepting? method read_character (line 6) | def read_character(character) method read_string (line 10) | def read_string(string) method current_states (line 16) | def current_states FILE: ruby/understanding-computation/03/lib/nfa_design.rb class NFADesign (line 1) | class NFADesign < Struct.new(:start_state, :accept_states, :rulebook) method accepts? (line 4) | def accepts?(string) method to_nfa (line 8) | def to_nfa(current_states = Set[start_state]) method to_dfa_design (line 12) | def to_dfa_design FILE: ruby/understanding-computation/03/lib/nfa_rulebook.rb class NFARulebook (line 1) | class NFARulebook < Struct.new(:rules) method next_states (line 2) | def next_states(states, character) method follow_rules_for (line 6) | def follow_rules_for(state, character) method rules_for (line 10) | def rules_for(state, character) method follow_free_moves (line 14) | def follow_free_moves(states) method alphabet (line 24) | def alphabet FILE: ruby/understanding-computation/03/lib/nfa_simulation.rb class NFASimulation (line 1) | class NFASimulation < Struct.new(:nfa_design) method next_state (line 2) | def next_state(state, character) method rules_for (line 8) | def rules_for(state) method discover_states_and_rules (line 14) | def discover_states_and_rules(states) method to_dfa_design (line 25) | def to_dfa_design FILE: ruby/understanding-computation/03/lib/pattern.rb type Pattern (line 1) | module Pattern function parse (line 2) | def self.parse(string) function bracket (line 6) | def bracket(outer_precendence) function inspect (line 14) | def inspect function matches? (line 18) | def matches?(string) class Empty (line 23) | class Empty method to_s (line 26) | def to_s method precendence (line 30) | def precendence method to_nfa_design (line 34) | def to_nfa_design class Literal (line 43) | class Literal < Struct.new(:character) method to_s (line 46) | def to_s method precendence (line 50) | def precendence method to_nfa_design (line 54) | def to_nfa_design class Concatenate (line 64) | class Concatenate < Struct.new(:first, :second) method to_s (line 67) | def to_s method precendence (line 71) | def precendence method to_nfa_design (line 75) | def to_nfa_design class Choose (line 92) | class Choose < Struct.new(:first, :second) method to_s (line 95) | def to_s method precendence (line 99) | def precendence method to_nfa_design (line 103) | def to_nfa_design class Repeat (line 122) | class Repeat < Struct.new(:pattern) method to_s (line 125) | def to_s method precendence (line 129) | def precendence method to_nfa_design (line 133) | def to_nfa_design FILE: ruby/understanding-computation/04/lib/dpda.rb class DPDA (line 1) | class DPDA < Struct.new(:current_configuration, :accept_states, :rulebook) method accepting? (line 2) | def accepting? method next_configuration (line 6) | def next_configuration(character) method stuck? (line 14) | def stuck? method read_character (line 18) | def read_character(character) method read_string (line 22) | def read_string(string) method current_configuration (line 28) | def current_configuration FILE: ruby/understanding-computation/04/lib/dpda_design.rb class DPDADesign (line 1) | class DPDADesign < Struct.new(:start_state, :bottom_character, method accepts? (line 3) | def accepts?(string) method to_dpda (line 7) | def to_dpda FILE: ruby/understanding-computation/04/lib/dpda_rulebook.rb class DPDARulebook (line 1) | class DPDARulebook < Struct.new(:rules) method next_configuration (line 2) | def next_configuration(configuration, character) method rule_for (line 6) | def rule_for(configuration, character) method applies_to? (line 10) | def applies_to?(configuration, character) method follow_free_moves (line 14) | def follow_free_moves(configuration) FILE: ruby/understanding-computation/04/lib/lexical_analyzer.rb class LexicalAnalyzer (line 1) | class LexicalAnalyzer < Struct.new(:string) method analyze (line 21) | def analyze method more_tokens? (line 29) | def more_tokens? method next_token (line 33) | def next_token method rule_matching (line 39) | def rule_matching(string) method match_at_beginning (line 45) | def match_at_beginning(pattern, string) method rule_with_longest_match (line 49) | def rule_with_longest_match(rules_with_matches) method string_after (line 53) | def string_after(match) FILE: ruby/understanding-computation/04/lib/npda.rb class NPDA (line 1) | class NPDA < Struct.new(:current_configurations, :accept_states, :rulebook) method accepting? (line 2) | def accepting? method read_character (line 6) | def read_character(character) method read_string (line 10) | def read_string(string) method current_configurations (line 16) | def current_configurations FILE: ruby/understanding-computation/04/lib/npda_design.rb class NPDADesign (line 1) | class NPDADesign < Struct.new(:start_state, :bottom_character, :accept_s... method accepts? (line 2) | def accepts?(string) method to_npda (line 6) | def to_npda FILE: ruby/understanding-computation/04/lib/npda_rulebook.rb class NPDARulebook (line 1) | class NPDARulebook < Struct.new(:rules) method next_configurations (line 2) | def next_configurations(configurations, character) method follow_rules_for (line 6) | def follow_rules_for(configuration, character) method rules_for (line 10) | def rules_for(configuration, character) method follow_free_moves (line 14) | def follow_free_moves(configurations) FILE: ruby/understanding-computation/04/lib/pda_configuration.rb class PDAConfiguration (line 1) | class PDAConfiguration < Struct.new(:state, :stack) method stuck (line 4) | def stuck method stuck? (line 8) | def stuck? FILE: ruby/understanding-computation/04/lib/pda_rule.rb class PDARule (line 1) | class PDARule < Struct.new(:state, :character, :next_state, method applies_to? (line 3) | def applies_to?(configuration, character) method follow (line 9) | def follow(configuration) method next_stack (line 13) | def next_stack(configuration) FILE: ruby/understanding-computation/04/lib/simple_parser.rb type SimpleParser (line 1) | module SimpleParser function accepts? (line 38) | def self.accepts?(string) FILE: ruby/understanding-computation/04/lib/stack.rb class Stack (line 1) | class Stack < Struct.new(:contents) method push (line 2) | def push(character) method pop (line 6) | def pop method top (line 10) | def top method inspect (line 14) | def inspect FILE: scheme/eopl/build/exercise.rb class Exercise (line 1) | class Exercise method initialize (line 4) | def initialize(chapter, number) method next (line 15) | def next method each (line 23) | def each method each_with_test (line 31) | def each_with_test method chapters (line 40) | def chapters(include_appendices = true) method exercises_in_chapter (line 46) | def exercises_in_chapter(chapter) method name (line 52) | def name method file_path (line 56) | def file_path method test_path (line 60) | def test_path method exercise_require_path (line 64) | def exercise_require_path method has_test? (line 68) | def has_test? method formatted_chapter (line 74) | def formatted_chapter FILE: scheme/sicp/05/support/51/evaluator.c type p_type (line 52) | typedef enum p_type p_type; type symbol_node (line 53) | typedef struct symbol_node symbol_node; type memory (line 54) | typedef struct pairs memory; type value (line 55) | typedef struct value value; type value (line 57) | typedef value (*primitive_function)(value); type p_type (line 68) | enum p_type { type value (line 81) | struct value { type pairs (line 95) | struct pairs { function error (line 135) | void error(const char *message) { function errorc (line 140) | void errorc(const char *message, char c) { function errorv (line 145) | void errorv(const char *message, value val) { function errort (line 152) | void errort(const char *message, char *token) { function errors (line 158) | void errors(const char *message, symbol sym) { type symbol_node (line 175) | struct symbol_node { function symbol_node (line 180) | symbol_node* allocate_symbol_node(const char *name) { function symbol (line 191) | symbol intern(const char *name) { function initialize_symbols (line 226) | void initialize_symbols() { function null_p (line 262) | bool null_p(value val) { return val.type == p_null; } function boolean_p (line 263) | bool boolean_p(value val) { return val.type == p_boolean; } function number_p (line 264) | bool number_p(value val) { return val.type == p_number; } function symbol_p (line 265) | bool symbol_p(value val) { return val.type == p_symbol; } function string_p (line 266) | bool string_p(value val) { return val.type == p_string; } function pair_p (line 267) | bool pair_p(value val) { return val.type == p_pair; } function procedure_p (line 268) | bool procedure_p(value val) { return val.type == p_procedure; } function primitive_p (line 269) | bool primitive_p(value val) { return val.type == p_primitive; } function label_p (line 270) | bool label_p(value val) { return val.type == p_label; } function broken_heart_p (line 271) | bool broken_heart_p(value val) { return val.type == p_broken_heart; } function value (line 275) | value null() { function value (line 281) | value truev() { function value (line 285) | value falsev() { function value (line 289) | value booleanv(bool val) { function value (line 295) | value num(long n) { function value_to_long (line 299) | long value_to_long(value val) { function value (line 308) | value sym(const char *s) { function symbol (line 312) | symbol value_to_sym(value val) { function value (line 321) | value str(const char *s) { function value (line 329) | value cons(value car, value cdr) { function value (line 344) | value car(value pair) { function value (line 351) | value cdr(value pair) { function set_car (line 358) | void set_car(value pair, value val) { function set_cdr (line 366) | void set_cdr(value pair, value val) { function value (line 376) | value pcons(value car, value cdr) { function value (line 385) | value pcdr(value proc) { function value (line 392) | value pcar(value proc) { function value (line 401) | value primitive(primitive_function function) { function value (line 407) | value label(void *label) { function value (line 420) | value broken_heart() { function wipe_memory (line 432) | void wipe_memory(memory *memory) { function initialize_memory (line 438) | void initialize_memory() { function push (line 455) | void push(value v) { function value (line 462) | value pop() { function initialize_registers (line 483) | void initialize_registers() { function value (line 499) | value first(value pair) { return car(pair); } function value (line 500) | value second(value pair) { return car(cdr(pair)); } function value (line 501) | value third(value pair) { return car(cdr(cdr(pair))); } function value (line 502) | value fourth(value pair) { return car(cdr(cdr(cdr(pair)))); } function length (line 511) | int length(value list) { function eq (line 522) | bool eq(value v1, value v2) { function equal (line 526) | bool equal(value v1, value v2) { function value (line 559) | value empty_environment() { function value (line 563) | value extend_environment(value vars, value vals, value enclosing) { function value (line 571) | value lookup_variable(symbol name, value env) { function define_variable (line 592) | void define_variable(symbol name, value val, value env) { function set_variable_value (line 601) | void set_variable_value(symbol name, value val, value env) { function true_p (line 630) | bool true_p(value val) { function value (line 634) | value make_procedure(value params, value body, value env) { function value (line 638) | value procedure_parameters(value proc) { return pcar(proc); } function value (line 639) | value procedure_body(value proc) { return first(pcdr(proc)); } function value (line 640) | value procedure_environment(value proc) { return second(pcdr(proc)); } function value (line 642) | value empty_arglist() { function value (line 646) | value adjoin_arg(value arg, value arglist) { function value (line 653) | value apply_primitive_procedure(value proc, value args) { function value (line 669) | value prim_add(value args) { function value (line 680) | value prim_sub(value args) { function value (line 695) | value prim_mul(value args) { function value (line 706) | value prim_equal_sign(value args) { function value (line 713) | value prim_less_than_sign(value args) { function value (line 720) | value prim_eq_p(value args) { function value (line 724) | value prim_equal_p(value args) { function value (line 728) | value prim_number_p(value args) { function value (line 732) | value prim_string_p(value args) { function value (line 736) | value prim_symbol_p(value args) { function value (line 740) | value prim_pair_p(value args) { function value (line 744) | value prim_null_p(value args) { function value (line 748) | value prim_car(value args) { function value (line 752) | value prim_cdr(value args) { function value (line 756) | value prim_cons(value args) { function value (line 760) | value prim_list(value args) { function value (line 764) | value prim_set_car_bang(value args) { function value (line 769) | value prim_set_cdr_bang(value args) { function value (line 774) | value prim_display(value args) { function value (line 780) | value prim_newline(value args) { function value (line 786) | value prim_gc_runs(value args) { function value (line 790) | value prim_stack_max_depth(value args) { function add_primitive_to_env (line 802) | void add_primitive_to_env(value env, const char *name, primitive_functio... function initialize_global_environment (line 806) | void initialize_global_environment() { function gc (line 904) | void gc() { function relocate (line 927) | void relocate(value val) { function update (line 945) | void update(value *val) { function relocate_registers_and_stack (line 957) | void relocate_registers_and_stack() { function update_registers_and_stack (line 972) | void update_registers_and_stack() { function update_value_from_old_memory (line 987) | void update_value_from_old_memory(value *val) { function gc_if_necessary (line 994) | void gc_if_necessary() { function print_cdr (line 1007) | void print_cdr(value v) { function print (line 1024) | void print(value v) { function value (line 1082) | value read(const char *string) { function advance (line 1090) | char advance() { function match (line 1100) | void match(char c) { function whitespace (line 1106) | void whitespace() { function value (line 1118) | value parse_symbol() { function value (line 1134) | value parse_number() { function value (line 1150) | value parse_string() { function value (line 1170) | value parse_quote() { function value (line 1178) | value parse_list() { function value (line 1198) | value parse_sexp() { function tagged_list_p (line 1220) | bool tagged_list_p(value expr, symbol tag) { function self_evaluating_p (line 1229) | bool self_evaluating_p(value expr) { return number_p(expr) || string_p(e... function variable_p (line 1230) | bool variable_p(value expr) { return symbol_p(expr); ... function quoted_p (line 1231) | bool quoted_p(value expr) { return tagged_list_p(expr, s_quote)... function begin_p (line 1232) | bool begin_p(value expr) { return tagged_list_p(expr, s_begin)... function if_p (line 1233) | bool if_p(value expr) { return tagged_list_p(expr, s_if); ... function definition_p (line 1234) | bool definition_p(value expr) { return tagged_list_p(expr, s_define... function assignment_p (line 1235) | bool assignment_p(value expr) { return tagged_list_p(expr, s_set_ba... function lambda_p (line 1236) | bool lambda_p(value expr) { return tagged_list_p(expr, s_lambda... function application_p (line 1237) | bool application_p(value expr) { return pair_p(expr); ... function value (line 1239) | value text_of_quotation(value expr) { return car(cdr(expr)); } function value (line 1241) | value if_predicate(value expr) { return second(expr); } function value (line 1242) | value if_consequent(value expr) { return third(expr); } function value (line 1243) | value if_alternative(value expr) { return fourth(expr); } function value (line 1245) | value operator(value expr) { return car(expr); } function value (line 1246) | value operands(value expr) { return cdr(expr); } function no_operands_p (line 1247) | bool no_operands_p(value expr) { return null_p(expr); } function value (line 1249) | value lambda_parameters(value expr) { return car(cdr(expr)); } function value (line 1250) | value lambda_body(value expr) { return cdr(cdr(expr)); } function value (line 1252) | value assignment_variable(value expr) { return second(expr); } function value (line 1253) | value assignment_value(value expr) { return third(expr); } function value (line 1255) | value make_lambda(value parameters, value body) { function value (line 1259) | value definition_variable(value expr) { function value (line 1266) | value definition_value(value expr) { function value (line 1274) | value begin_actions(value expr) { return cdr(expr); } function value (line 1275) | value first_exp(value expr) { return car(expr); } function value (line 1276) | value rest_exps(value expr) { return cdr(expr); } function last_exp_p (line 1277) | int last_exp_p(value expr) { return pair_p(expr) && null_p(cdr(expr... function value (line 1279) | value first_operand(value expr) { return car(expr); } function value (line 1280) | value rest_operands(value expr) { return cdr(expr); } function last_operand_p (line 1281) | int last_operand_p(value expr) { return pair_p(expr) && null_p(cdr(expr... function value (line 1296) | value start() { function value (line 1473) | value eval(value expression) { function run_file (line 1490) | void run_file(const char *filename) { function value (line 1522) | value read_line() { function repl (line 1529) | void repl() { function main (line 1551) | int main(int argc, char *argv[]) { FILE: scheme/sicp/05/support/52/runtime.c type p_type (line 29) | typedef enum p_type p_type; type symbol_node (line 30) | typedef struct symbol_node symbol_node; type memory (line 31) | typedef struct pairs memory; type value (line 32) | typedef struct value value; type value (line 34) | typedef value (*primitive_function)(value); type p_type (line 40) | enum p_type { type value (line 53) | struct value { type pairs (line 62) | struct pairs { function error (line 94) | void error(const char *message) { function errorc (line 99) | void errorc(const char *message, char c) { function errorv (line 104) | void errorv(const char *message, value val) { function errort (line 111) | void errort(const char *message, char *token) { function errors (line 117) | void errors(const char *message, symbol sym) { type symbol_node (line 128) | struct symbol_node { function symbol_node (line 133) | symbol_node* allocate_symbol_node(const char *name) { function symbol (line 144) | symbol intern(const char *name) { function initialize_symbols (line 176) | void initialize_symbols() { function null_p (line 192) | bool null_p(value val) { return val.type == p_null; } function boolean_p (line 193) | bool boolean_p(value val) { return val.type == p_boolean; } function number_p (line 194) | bool number_p(value val) { return val.type == p_number; } function symbol_p (line 195) | bool symbol_p(value val) { return val.type == p_symbol; } function string_p (line 196) | bool string_p(value val) { return val.type == p_string; } function pair_p (line 197) | bool pair_p(value val) { return val.type == p_pair; } function procedure_p (line 198) | bool procedure_p(value val) { return val.type == p_procedure; } function primitive_p (line 199) | bool primitive_p(value val) { return val.type == p_primitive; } function label_p (line 200) | bool label_p(value val) { return val.type == p_label; } function broken_heart_p (line 201) | bool broken_heart_p(value val) { return val.type == p_broken_heart; } function value (line 205) | value null() { function value (line 211) | value truev() { function value (line 215) | value falsev() { function value (line 219) | value booleanv(bool val) { function value (line 225) | value num(long n) { function value_to_long (line 229) | long value_to_long(value val) { function value (line 238) | value sym(const char *s) { function symbol (line 242) | symbol value_to_sym(value val) { function value (line 251) | value str(const char *s) { function value (line 259) | value cons(value car, value cdr) { function value (line 274) | value car(value pair) { function value (line 281) | value cdr(value pair) { function set_car (line 288) | void set_car(value pair, value val) { function set_cdr (line 296) | void set_cdr(value pair, value val) { function value (line 306) | value pcons(value car, value cdr) { function value (line 315) | value pcdr(value proc) { function value (line 322) | value pcar(value proc) { function value (line 331) | value primitive(primitive_function function) { function value (line 337) | value label(void *label) { function value (line 350) | value broken_heart() { function wipe_memory (line 358) | void wipe_memory(memory *memory) { function initialize_memory (line 364) | void initialize_memory() { function push (line 379) | void push(value v) { function value (line 386) | value pop() { function initialize_registers (line 404) | void initialize_registers() { function value (line 416) | value first(value pair) { return car(pair); } function value (line 417) | value second(value pair) { return car(cdr(pair)); } function value (line 418) | value third(value pair) { return car(cdr(cdr(pair))); } function value (line 419) | value fourth(value pair) { return car(cdr(cdr(cdr(pair)))); } function length (line 425) | int length(value list) { function eq (line 436) | bool eq(value v1, value v2) { function equal (line 440) | bool equal(value v1, value v2) { function value (line 463) | value empty_environment() { function value (line 467) | value extend_environment(value vars, value vals, value enclosing) { function value (line 475) | value lookup_variable(symbol name, value env) { function define_variable (line 496) | void define_variable(symbol name, value val, value env) { function set_variable_value (line 505) | void set_variable_value(symbol name, value val, value env) { function value (line 532) | value apply_primitive_procedure(value proc, value args) { function value (line 545) | value prim_add(value args) { function value (line 556) | value prim_sub(value args) { function value (line 571) | value prim_mul(value args) { function value (line 582) | value prim_equal_sign(value args) { function value (line 589) | value prim_less_than_sign(value args) { function value (line 596) | value prim_eq_p(value args) { function value (line 600) | value prim_equal_p(value args) { function value (line 604) | value prim_number_p(value args) { function value (line 608) | value prim_string_p(value args) { function value (line 612) | value prim_symbol_p(value args) { function value (line 616) | value prim_pair_p(value args) { function value (line 620) | value prim_null_p(value args) { function value (line 624) | value prim_car(value args) { function value (line 628) | value prim_cdr(value args) { function value (line 632) | value prim_cons(value args) { function value (line 636) | value prim_list(value args) { function value (line 640) | value prim_set_car_bang(value args) { function value (line 645) | value prim_set_cdr_bang(value args) { function value (line 650) | value prim_display(value args) { function value (line 656) | value prim_newline(value args) { function value (line 662) | value prim_gc_if_necessary(value args) { function value (line 667) | value prim_gc_runs(value args) { function value (line 671) | value prim_stack_max_depth(value args) { function value (line 675) | value prim_apply_primitive(value args) { function value (line 685) | value prim_error(value args) { function add_primitive_to_env (line 699) | void add_primitive_to_env(value env, const char *name, primitive_functio... function initialize_global_environment (line 703) | void initialize_global_environment() { function gc (line 758) | void gc() { function relocate (line 781) | void relocate(value val) { function update (line 799) | void update(value *val) { function relocate_registers_and_stack (line 811) | void relocate_registers_and_stack() { function update_registers_and_stack (line 824) | void update_registers_and_stack() { function update_value_from_old_memory (line 837) | void update_value_from_old_memory(value *val) { function gc_if_necessary (line 844) | void gc_if_necessary() { function print_cdr (line 855) | void print_cdr(value v) { function print (line 872) | void print(value v) { function value (line 922) | value read(const char *string) { function advance (line 930) | char advance() { function match (line 940) | void match(char c) { function whitespace (line 946) | void whitespace() { function value (line 958) | value parse_symbol() { function value (line 974) | value parse_number() { function value (line 990) | value parse_string() { function value (line 1010) | value parse_quote() { function value (line 1018) | value parse_list() { function value (line 1038) | value parse_sexp() { function run_file (line 1058) | void run_file(const char *filename) { function value (line 1087) | value read_line() { function repl (line 1094) | void repl() { function main (line 1113) | int main(int argc, char *argv[]) { function primitive_procedure_p (line 1135) | bool primitive_procedure_p(value proc) { function value (line 1139) | value lookup_variable_value(value name, value env) { function value (line 1143) | value list(value singleton) { function value (line 1147) | value make_compiled_procedure(value entry, value env) { function value (line 1151) | value compiled_procedure_entry(value proc) { function value (line 1155) | value compiled_procedure_env(value proc) { function set_variable_value_bang (line 1159) | void set_variable_value_bang(value name, value val, value env) { function define_variable_bang (line 1163) | void define_variable_bang(value name, value val, value env) { function true_p (line 1167) | bool true_p(value val) { function false_p (line 1171) | bool false_p(value val) { function value (line 1194) | value eval(value expr) {