Index
All Classes and Interfaces|All Packages|Serialized Form
A
- AgentsTasks - Class in topics.branchandbound
-
BRANCH AND BOUND PROBLEM: THE PROBLEM OF ASSIGNING N TASK TO AGENTS
- AgentsTasks - Class in topics.greedy
-
GREEDY ALGORITHM PROBLEM: THE PROBLEM OF ASSIGNING N TASK TO AGENTS This program can solve the problem using two greedy algorithms and test operation.
- AgentsTasks(int[][]) - Constructor for class topics.greedy.AgentsTasks
-
Constructor for AgentsTasks objects
- AgentsTasks(int, int[][]) - Constructor for class topics.branchandbound.AgentsTasks
-
Constructor for AgentsTasks objects
- AgentsTasksDifferentSizesTimes - Class in topics.greedy.agentsTasks
-
GREEDY ALGORITHM PROBLEM: THE PROBLEM OF ASSIGNING N TASK TO AGENTS This program serves to increase the size of the execution times of the problem and to check the quadratic behavior expected O(n^2)
- AgentsTasksDifferentSizesTimes() - Constructor for class topics.greedy.agentsTasks.AgentsTasksDifferentSizesTimes
- AgentsTasksRandomValues - Class in topics.greedy.agentsTasks
-
GREEDY ALGORITHM PROBLEM: THE PROBLEM OF ASSIGNING N TASK TO AGENTS This program serves to randomly generate a matrix of costs (the size is introduced by the user).
- AgentsTasksRandomValues() - Constructor for class topics.greedy.agentsTasks.AgentsTasksRandomValues
- AgentsTasksTimes - Class in topics.backtracking.times
-
BACKTRACKING PROBLEM: THE PROBLEM OF ASSIGNING N TASK TO AGENTS This program can solve the problem using a backtracking algorithm
- AgentsTasksTimes(int) - Constructor for class topics.backtracking.times.AgentsTasksTimes
-
Constructor, sets the size of the problem and makes the array to store the state of the problem
- Algorithm Comparison - Section in package topics.sorting
- Algorithm Introduction - Section in package topics.introduction
- Algorithm Steps - Section in topics.dynamic.Change.change(int, int[])
- ArrayDequeExample - Class in topics.introduction.examples
- ArrayDequeExample() - Constructor for class topics.introduction.examples.ArrayDequeExample
- ArrayListExample - Class in topics.introduction.examples
-
Demonstrates basic
ArrayListoperations: add, remove, and iteration. - ArrayListExample() - Constructor for class topics.introduction.examples.ArrayListExample
- assignTasksToPlumbersBADWAY(int[][], int[]) - Method in class topics.greedy.SomePlumbers
-
Assigns tasks to plumbers
- assignTasksToPlumbersBESTWAY(int[][], int[]) - Method in class topics.greedy.SomePlumbers
-
Assigns tasks to the less busy plumber
- assumption1() - Method in class topics.backtracking.SubsetsGivenSum
-
An example: the first n natural numbers
- assumption2() - Method in class topics.backtracking.SubsetsGivenSum
-
Another example: the first square numbers
B
- backtracking() - Method in class topics.backtracking.ChessHorseAll
- backtracking() - Method in class topics.backtracking.ChessHorseOne
- backtracking() - Method in class topics.backtracking.Permutations
- backtracking(int) - Method in class topics.backtracking.ChessQueensAll
-
Performs the backtracking process
- backtracking(int) - Method in class topics.backtracking.ChessQueensOne
-
Performs the backtracking process
- backtracking(int) - Method in class topics.backtracking.SubsetsGivenSum
-
Performs the backtracking process
- backtracking(int) - Method in class topics.backtracking.times.AgentsTasksTimes
-
Backtracking that solves the stated problem
- bestNode - Variable in class topics.branchandbound.util.BranchAndBound
- bestNode - Static variable in class topics.branchandbound.util.threads.BranchAndBoundThreads
- BidirectionalBubble - Class in topics.sorting.others
-
Sorting algorithm: Bidirectional Bubble method
- BidirectionalBubble() - Constructor for class topics.sorting.others.BidirectionalBubble
- BinaryInsertion - Class in topics.sorting.others
-
Sorting algorithm: Binary Insertion method
- BinaryInsertion() - Constructor for class topics.sorting.others.BinaryInsertion
- BinarySearch - Class in topics.divideconquer
-
Binary Search implementation for finding an element in a sorted array.
- BinarySearch() - Constructor for class topics.divideconquer.BinarySearch
- binarySearch1(int[], int) - Method in class topics.divideconquer.BinarySearch
-
Iterative binary search implementation.
- binarySearch2(int[], int) - Method in class topics.divideconquer.BinarySearch
-
Recursive binary search implementation.
- branchAndBound(Node) - Method in class topics.branchandbound.util.BranchAndBound
-
Manages all the process, from the beginning to the end
- branchAndBound(Node, int) - Method in class topics.branchandbound.util.threads.BranchAndBoundThreads
-
Manages all the process, from the beginning to the end
- BranchAndBound - Class in topics.branchandbound.util
-
Main class to solve problems using the Branch and Bound technique We need to extend it for any specific problem
- BranchAndBound() - Constructor for class topics.branchandbound.util.BranchAndBound
-
Constructor for BrancAndBount objects
- BranchAndBoundThreads - Class in topics.branchandbound.util.threads
-
Main class to solve problems using the Branch and Bound technique We need to extend it for any specific problem
- BranchAndBoundThreads() - Constructor for class topics.branchandbound.util.threads.BranchAndBoundThreads
-
Constructor for BrancAndBount objects
- Bubble - Class in topics.sorting
-
Bubble Sort Algorithm - Educational Sorting Implementation.
- Bubble() - Constructor for class topics.sorting.Bubble
C
- calculate() - Method in class topics.greedy.FilesDisc1
-
Calculates the amount of files in a disc
- calculate() - Method in class topics.greedy.FilesDisc2
-
Calculates the amount of used space in a disc
- calculateCoins(double) - Method in class topics.greedy.Change
-
Calculates the coins to be used to give a specific amount of money This method has a good complexity O(n)
- calculateHeuristicValue() - Method in class topics.branchandbound.util.Node
- change(int, int[]) - Method in class topics.dynamic.Change
-
Finds the minimum number of coins needed to make exact change for
amount. - Change - Class in topics.dynamic
-
Coin Change Problem — Dynamic Programming solution.
- Change - Class in topics.greedy
-
GREEDY ALGORITHM PROBLEM: THE PROBLEM OF THE CHANGE OF MONEY It has an optimal solution in some cases.
- Change() - Constructor for class topics.dynamic.Change
- Change(float[], int[]) - Constructor for class topics.greedy.Change
-
Constructor for Change objects
- ChessHorse - Class in topics.greedy
-
GREEDY ALGORITHM PROBLEM: THE HORSE JUMPING PROBLEM (Knight's tour) It has not an optimal solution in some cases
- ChessHorse(int) - Constructor for class topics.greedy.ChessHorse
-
Constructor for ChessHorse objects
- ChessHorseAll - Class in topics.backtracking
-
BACKTRACKING PROBLEM: THE HORSE JUMPING PROBLEM The program calculates all the ways of moving a horse through an entire chessboard of side n
- ChessHorseAll(int, int, int) - Constructor for class topics.backtracking.ChessHorseAll
-
Constructor for ChessHorseOne objects
- ChessHorseOne - Class in topics.backtracking
-
BACKTRACKING PROBLEM: THE HORSE JUMPING PROBLEM This program calculates all the ways of moving a horse through an entire chessboard of side n
- ChessHorseOne(int, int, int) - Constructor for class topics.backtracking.ChessHorseOne
-
Constructor for ChessHorseOne objects
- ChessHorseSimpleHeuristic - Class in topics.greedy
-
GREEDY ALGORITHM PROBLEM: THE HORSE JUMPING PROBLEM (Knight's tour) It has not an optimal solution in some cases
- ChessHorseSimpleHeuristic(int) - Constructor for class topics.greedy.ChessHorseSimpleHeuristic
-
Constructor for ChessHorse objects
- ChessQueensAll - Class in topics.backtracking
-
BACKTRACKING PROBLEM: THE PROBLEM OF THE N QUEENS This program calculates one way of placing n queens on a chessboard of side n
- ChessQueensAll(int) - Constructor for class topics.backtracking.ChessQueensAll
-
Constructor for ChessQueensAll objects
- ChessQueensOne - Class in topics.backtracking
-
BACKTRACKING PROBLEM: THE PROBLEM OF THE N QUEENS This program calculates one way of placing n queens on a chessboard of side n
- ChessQueensOne(int) - Constructor for class topics.backtracking.ChessQueensOne
-
Constructor for ChessQueensOne objects
- Classes in This Package - Section in package topics.backtracking
- Classes in This Package - Section in package topics.backtracking.times
- Classes in This Package - Section in package topics.branchandbound
- Classes in This Package - Section in package topics.branchandbound.times
- Classes in This Package - Section in package topics.branchandbound.util
- Classes in This Package - Section in package topics.branchandbound.util.threads
- Classes in This Package - Section in package topics.divideconquer
- Classes in This Package - Section in package topics.divideconquer.utils
- Classes in This Package - Section in package topics.dynamic
- Classes in This Package - Section in package topics.greedy
- Classes in This Package - Section in package topics.greedy.agentsTasks
- Classes in This Package - Section in package topics.introduction
- Classes in This Package - Section in package topics.introduction.examples
- Classes in This Package - Section in package topics.parallel
- Classes in This Package - Section in package topics.sorting
- Classes in This Package - Section in package topics.sorting.others
- Classes in This Package - Section in package topics.sorting.utils
- combinations(long[][], int, int) - Method in class topics.dynamic.Combinations
-
Calculates the combinations of n elements taken k by k
- Combinations - Class in topics.dynamic
-
DYNAMIC PROGRAMMING PROBLEM: MATHEMATICAL COMBINATIONS n x k The recursive algorithm that calculates Combinations has exponential complexity and repeats calculations already performed.
- Combinations() - Constructor for class topics.dynamic.Combinations
- combinationsDivideAndConquer(int, int) - Method in class topics.dynamic.Combinations
-
Divide and conquer recursive version.
- compareTo(Node) - Method in class topics.branchandbound.util.Node
- Comparison with Related Techniques - Section in package topics.branchandbound
- Complexity - Section in class topics.dynamic.Change
- Complexity - Section in topics.dynamic.Change.change(int, int[])
- compute() - Method in class topics.introduction.MaxPairWiseProduct
- compute() - Method in class topics.introduction.MaxPairWiseProduct2
-
The problem with the previous version is: Maximum JAVA int value: 2_147_483_647 Expected result: 100_000_000_000 If we work with long, the maximum JAVA long value: 9_223_372_036_854_775_807
- compute() - Method in class topics.introduction.MaxPairWiseProduct3
- compute() - Method in class topics.introduction.MaxPairWiseProduct4
- compute() - Method in class topics.introduction.MaxPairWiseProduct5
- compute() - Method in class topics.introduction.MaxPairWiseProduct6
- compute() - Method in class topics.parallel.FibonacciTask
- compute() - Method in class topics.parallel.RecursiveActionComparison
- compute() - Method in class topics.parallel.RecursiveActionSquare
- compute() - Method in class topics.parallel.RecursiveTaskSum
- Core Steps - Section in package topics.branchandbound
- createEmpty() - Method in class topics.branchandbound.util.Heap
-
Clears the priority queue
- createEmpty() - Method in class topics.branchandbound.util.threads.HeapThreads
-
Clears the priority queue
D
- depth - Variable in class topics.branchandbound.util.Node
- Difference from Divide & Conquer - Section in package topics.dynamic
- DirectInsertion - Class in topics.sorting
-
Sorting algorithm: Direct insertion method
- DirectInsertion() - Constructor for class topics.sorting.DirectInsertion
- DirectSelection - Class in topics.sorting
-
Sorting algorithm: Direct selection method
- DirectSelection() - Constructor for class topics.sorting.DirectSelection
- Distinction from Dynamic Programming - Section in package topics.divideconquer
- ds - Variable in class topics.branchandbound.util.BranchAndBound
- ds - Static variable in class topics.branchandbound.util.threads.BranchAndBoundThreads
E
- EightPuzzle - Class in topics.branchandbound
-
BRANCH AND BOUND PROBLEM: THE PUZZLE
- EightPuzzle(HeuristicType, int[]) - Constructor for class topics.branchandbound.EightPuzzle
-
Constructor for EightPuzzle objects
- empty() - Method in class topics.branchandbound.util.Heap
-
Checks whether the priority queue is empty
- empty() - Method in class topics.branchandbound.util.threads.HeapThreads
-
Checks whether the priority queue is empty
- equals(Node) - Method in class topics.branchandbound.util.Node
-
Compares whether two nodes are equal using the ToString method
- estimateBest() - Method in class topics.branchandbound.util.Heap
-
Gets the heuristic of the best node in the priority queue
- estimateBest() - Method in class topics.branchandbound.util.threads.HeapThreads
-
Gets the heuristic of the best node in the priority queue
- euclideanGCG(long, long) - Method in class topics.divideconquer.GCG
-
Euclidean algorithm to solve the GCG problem
- Example Table - Section in class topics.dynamic.Change
- execute() - Method in class topics.backtracking.times.AgentsTasksTimes
-
Measures execution times for the backtracking assignment problem.
- expand() - Method in class topics.branchandbound.util.Node
- extractBestNode() - Method in class topics.branchandbound.util.Heap
-
Retrieves and removes the first element of the priority queue
- extractBestNode() - Method in class topics.branchandbound.util.threads.HeapThreads
-
Retrieves and removes the first element of the priority queue
- extractUsedNodesFrom(Node) - Method in class topics.branchandbound.util.Heap
-
Extracts the nodes from a specific node (e.g., the solution) to the root node
- extractUsedNodesFrom(Node) - Method in class topics.branchandbound.util.threads.HeapThreads
-
Extracts the nodes from a specific node (e.g., the solution) to the root node
F
- fact1(int) - Method in class topics.divideconquer.Factorial
-
This method iteratively calculates the factorial with a linear complexity O(n)
- fact2(int) - Method in class topics.divideconquer.Factorial
-
This method recursively calculates the factorial with a linear complexity O(n), DandC by subtraction with a=1,b=1,k=0
- Factorial - Class in topics.divideconquer
-
DIVIDE AND CONQUER PROBLEM: CALCULATE THE FACTORIAL OF A NUMBER
- Factorial - Class in topics.introduction
-
To calculate the factorial of a number
- Factorial() - Constructor for class topics.divideconquer.Factorial
- Factorial() - Constructor for class topics.introduction.Factorial
- factorialOK(int) - Method in class topics.introduction.Factorial
-
Calculates the factorial of a number with a recursive algorithm
- factorialWrong(int) - Method in class topics.introduction.Factorial
-
Calculates the factorial of a number with a recursive algorithm It has a problem: if n is negative, it never stops
- fib1(int) - Method in class topics.divideconquer.Fibonacci
-
Calculates the n-th Fibonacci number using space-optimized iteration.
- fib1(int) - Method in class topics.dynamic.Fibonacci
-
First iterative solution with a temporal complexity O(n)
- fib2(int, int[]) - Method in class topics.divideconquer.Fibonacci
-
Calculates the n-th Fibonacci number using dynamic programming with a memoization array.
- fib2(int, int[]) - Method in class topics.dynamic.Fibonacci
-
Second iterative solution with time complexity O(n) and that uses a vector.
- fib3(int) - Method in class topics.divideconquer.Fibonacci
-
First recursive version, with a linear complexity O(n).
- fib3(int) - Method in class topics.dynamic.Fibonacci
-
First recursive version, with a linear complexity O(n).
- fib4(int) - Method in class topics.divideconquer.Fibonacci
-
Second recursive version, with equation T(n)=T(n-1)+T(n-2)+O(1), that once solved is exponential O(1.6^n).
- fib4(int) - Method in class topics.dynamic.Fibonacci
-
Second recursive version, with equation T(n)=T(n-1)+T(n-2)+O(1), that once solved is exponential O(1.6^n).
- fib5(int) - Method in class topics.divideconquer.Fibonacci
-
DandC sophisticated solution that is O(log n).
- fib5(int) - Method in class topics.dynamic.Fibonacci
-
DandC sophisticated solution that is O(log n).
- Fibonacci - Class in topics.divideconquer
-
Fibonacci Number Calculation using Divide and Conquer and Iterative Approaches.
- Fibonacci - Class in topics.dynamic
-
DYNAMIC PROGRAMMING: CALCULATE THE FIBONACCI NUMBER OF ORDER n Fibonacci Series = 0,1,1,2,3,5,8,13,21,34,55,89,... e.g. the 0 is when n=0 and the 89 is when n=11
- Fibonacci() - Constructor for class topics.divideconquer.Fibonacci
- Fibonacci() - Constructor for class topics.dynamic.Fibonacci
- FibonacciAlgorithm - Class in topics.parallel
-
To solve the classical Fibonacci algorithm using a recursive and inefficient algorithm
- FibonacciAlgorithm(int) - Constructor for class topics.parallel.FibonacciAlgorithm
-
Constructor
- FibonacciTask - Class in topics.parallel
-
To calculate the Fibonacci of a number n
- FibonacciTask(FibonacciAlgorithm) - Constructor for class topics.parallel.FibonacciTask
- FilesDisc1 - Class in topics.greedy
-
GREEDY ALGORITHM PROBLEM: MAXIMIZE THE NUMBER OF FILES ON A DISK It has an optimal solution.
- FilesDisc1(int[], int) - Constructor for class topics.greedy.FilesDisc1
-
Constructor for FilesDisc1 objects
- FilesDisc2 - Class in topics.greedy
-
GREEDY ALGORITHM PROBLEM: MINIMIZE THE FREE SPACE ON A DISK WITH FILES It has NOT an optimal solution in some cases.
- FilesDisc2(int[], int) - Constructor for class topics.greedy.FilesDisc2
-
Constructor for FilesDisc1 objects
- fillIn(int[][]) - Static method in class topics.greedy.agentsTasks.AgentsTasksRandomValues
- findObjects(int) - Method in class topics.greedy.Knapsack
-
This algorithm can have a complexity from O(n*logn) to O(n^2).
- findObjects(int) - Method in class topics.greedy.Knapsack01
-
This algorithm can have a complexity from O(n*logn) to O(n^2).
- findPosMax(int[], int) - Static method in class topics.sorting.utils.Util
-
Finds the position of the biggest element in the array
- findPosMin(int[], int) - Static method in class topics.sorting.utils.Util
-
Finds the position of the smallest element in the array
G
- GCG - Class in topics.divideconquer
-
GREATEST COMMON DIVISORS: Calculate the GCG of two positive integers
- GCG() - Constructor for class topics.divideconquer.GCG
- General Template - Section in package topics.backtracking
- generateCostMatrix() - Method in class topics.backtracking.times.AgentsTasksTimes
-
Random generation of the cost matrix
- GetAdditionFromList - Class in topics.introduction
-
To get the addition of a list of numbers
- GetAdditionFromList() - Constructor for class topics.introduction.GetAdditionFromList
- getBestNode() - Method in class topics.branchandbound.util.BranchAndBound
-
Gets the best node
- getBestNode() - Method in class topics.branchandbound.util.threads.BranchAndBoundThreads
-
Gets the best node
- getCost1(int[]) - Method in class topics.greedy.AgentsTasks
-
Gets the solution for Greedy1
- getCost2(int[]) - Method in class topics.greedy.AgentsTasks
-
Gets the solution for Greedy2
- getDepth() - Method in class topics.branchandbound.util.Node
-
Getter for depth
- getHeuristicValue() - Method in class topics.branchandbound.util.Node
-
Getter for heuristicValue
- getID() - Method in class topics.branchandbound.util.Node
-
Gets the ID of the node
- GetMaximumFromList - Class in topics.introduction
-
To get the maximum of a list of numbers
- GetMaximumFromList() - Constructor for class topics.introduction.GetMaximumFromList
- getNumberOfPermutations() - Method in class topics.backtracking.Permutations
-
Gets the number of permutations after the backtracking process
- getNumberOfSolutions() - Method in class topics.backtracking.ChessHorseAll
-
Gets the number of solutions after the backtracking process
- getNumberOfSolutions() - Method in class topics.backtracking.ChessQueensAll
-
Gets the number of solutions after the backtracking process
- getNumberOfSolutions() - Method in class topics.backtracking.SubsetsGivenSum
-
Gets the number of solutions after the backtracking process
- getOptimalTotalTimeOfWait() - Method in class topics.greedy.Plumber
-
Calculates minimum possible total waiting time (greedy optimal).
- getParentID() - Method in class topics.branchandbound.util.Node
-
Getter for parentID
- getRootNode() - Method in class topics.branchandbound.util.BranchAndBound
-
Gets the root node
- getRootNode() - Method in class topics.branchandbound.util.threads.BranchAndBoundThreads
-
Gets the root node
- getTotalTimeOfWait() - Method in class topics.greedy.Plumber
-
Calculates total waiting time for the current task order.
- getTotalTimeOfWait(int[][]) - Method in class topics.greedy.SomePlumbers
-
Calculates the total waiting time of customers
- greedy1(int[]) - Method in class topics.greedy.AgentsTasks
-
We assign each agent to the less expensive task This method has a quadratic complexity O(n^2)
- greedy2(int[]) - Method in class topics.greedy.AgentsTasks
-
We assign each task to the agent for which the it is less expensive This method has a quadratic complexity O(n^2)
H
- HashSetExample - Class in topics.introduction.examples
-
Demonstrates
HashSetoperations: add, remove, and contains. - HashSetExample() - Constructor for class topics.introduction.examples.HashSetExample
- Heap - Class in topics.branchandbound.util
-
To save and sort the nodes that are going to be used
- Heap() - Constructor for class topics.branchandbound.util.Heap
-
Constructor for Heap objects
- Heapsort - Class in topics.sorting.others
-
Sorting algorithm: Heapsort method
- Heapsort() - Constructor for class topics.sorting.others.Heapsort
- HeapThreads - Class in topics.branchandbound.util.threads
-
To save and sort the nodes that are going to be used
- HeapThreads() - Constructor for class topics.branchandbound.util.threads.HeapThreads
-
Constructor for Heap objects
- HelloWorld - Class in topics.introduction
-
Just to show a small example of how the project is structured
- HelloWorld() - Constructor for class topics.introduction.HelloWorld
- heuristicValue - Variable in class topics.branchandbound.util.Node
- horse(int[]) - Method in class topics.greedy.ChessHorse
-
Checks whether the horse can complete the board
- horse(int[]) - Method in class topics.greedy.ChessHorseSimpleHeuristic
-
Checks whether the horse can complete the board
I
- ID - Variable in class topics.branchandbound.util.Node
- ImprovedBubble - Class in topics.sorting
-
Sorting algorithm: Bubble method with sentinel
- ImprovedBubble() - Constructor for class topics.sorting.ImprovedBubble
- initialValuePruneLimit() - Method in class topics.branchandbound.util.Node
-
We can have extra information about the problem to prune all the nodes above a specific heuristicValue.
- insert(Node) - Method in class topics.branchandbound.util.Heap
-
Inserts a new node in the priority queue
- insert(Node) - Method in class topics.branchandbound.util.threads.HeapThreads
-
Inserts a new node in the priority queue
- interchange(int[], int, int) - Static method in class topics.sorting.utils.Util
-
Interchanges element i and element j
- ISortingAlgorithm - Interface in topics.sorting.utils
-
Interface for sorting algorithms
- isSolution() - Method in class topics.backtracking.ChessHorseOne
-
Returns whether there is a solution
- isSolution() - Method in class topics.backtracking.ChessQueensOne
-
Returns whether there is a solution
- isSolution() - Method in class topics.branchandbound.util.Node
K
- Key Concepts - Section in package topics.parallel
- Key Difference from Brute Force - Section in package topics.backtracking
- Knapsack - Class in topics.greedy
-
GREEDY ALGORITHM PROBLEM: THE KNAPSACK PROBLEM (BREAKABLE) it has an optimal solution
- Knapsack(int[], int[], float[]) - Constructor for class topics.greedy.Knapsack
-
Constructor for Knapsack objects
- knapsack01(int, float[], int[]) - Method in class topics.dynamic.Knapsack01
-
Solves the 0/1 knapsack problem using Dynamic Programming.
- Knapsack01 - Class in topics.dynamic
-
0/1 Knapsack Problem - Dynamic Programming Solution.
- Knapsack01 - Class in topics.greedy
-
GREEDY ALGORITHM PROBLEM: THE KNAPSACK PROBLEM (0/1).
- Knapsack01() - Constructor for class topics.dynamic.Knapsack01
- Knapsack01(int[], int[], float[]) - Constructor for class topics.greedy.Knapsack01
-
Constructor for Knapsack01 objects
L
- LinkedHashSetExample - Class in topics.introduction.examples
-
Demonstrates
LinkedHashSetoperations. - LinkedHashSetExample() - Constructor for class topics.introduction.examples.LinkedHashSetExample
- LinkedListExample - Class in topics.introduction.examples
-
Demonstrates
LinkedListas a doubly-linked list with operations at both ends: addFirst, addLast, removeFirst, and removeLast. - LinkedListExample() - Constructor for class topics.introduction.examples.LinkedListExample
M
- main(String[]) - Static method in class topics.backtracking.times.AgentsTasksTimes
- main(String[]) - Static method in class topics.backtracking.times.PermutationsTimes
- main(String[]) - Static method in class topics.greedy.agentsTasks.AgentsTasksDifferentSizesTimes
- main(String[]) - Static method in class topics.greedy.agentsTasks.AgentsTasksRandomValues
- main(String[]) - Static method in class topics.introduction.examples.ArrayDequeExample
- main(String[]) - Static method in class topics.introduction.examples.ArrayListExample
- main(String[]) - Static method in class topics.introduction.examples.HashSetExample
- main(String[]) - Static method in class topics.introduction.examples.LinkedHashSetExample
- main(String[]) - Static method in class topics.introduction.examples.LinkedListExample
- main(String[]) - Static method in class topics.introduction.examples.PriorityQueueExample
- main(String[]) - Static method in class topics.introduction.examples.StackExample
- main(String[]) - Static method in class topics.introduction.examples.TreeSetExample
- main(String[]) - Static method in class topics.introduction.examples.VectorExample
- main(String...) - Static method in class topics.introduction.MaxPairWiseProductRandomNumbers
- majoritarian1(int[]) - Method in class topics.divideconquer.MajoritarianElement
-
This method iteratively calculates whether there is or not majority element.
- majoritarian2(int[]) - Method in class topics.divideconquer.MajoritarianElement
-
This method previously orders the vector O(nlogn) and then it looks for the majoritarian element (if there is one), knowing that if there is one, it should be in the central position (among others) v[n/2].
- majoritarian3(int[]) - Method in class topics.divideconquer.MajoritarianElement
-
This method is recursive and difficult to understand.
- MajoritarianElement - Class in topics.divideconquer
-
//DIVIDE AND CONQUER PROBLEM: IS THERE A MAJORITARIAN ELEMENT IN n ELEMENTS?
- MajoritarianElement() - Constructor for class topics.divideconquer.MajoritarianElement
- max(int[]) - Method in class topics.introduction.GetMaximumFromList
-
To get the maximum value of the numbers contained in an array
- MaxPairWiseProduct - Class in topics.introduction
-
Computes the max pairwise product among different numbers E.g.: 7 3 6 => 42 However, in this example we will only work with two integer numbers
- MaxPairWiseProduct() - Constructor for class topics.introduction.MaxPairWiseProduct
- MaxPairWiseProduct2 - Class in topics.introduction
-
Computes the max pairwise product among different numbers E.g.: 7 3 6 => 42 However, in this example we will only work with two long numbers
- MaxPairWiseProduct2() - Constructor for class topics.introduction.MaxPairWiseProduct2
- MaxPairWiseProduct3 - Class in topics.introduction
-
Computes the max pairwise product among different numbers E.g.: 7 3 6 => 42 We will load the numbers from MaxPairWiseProductRandomNumbers.txt
- MaxPairWiseProduct3() - Constructor for class topics.introduction.MaxPairWiseProduct3
- MaxPairWiseProduct4 - Class in topics.introduction
-
Computes the max pairwise product among different numbers E.g.: 7 3 6 => 42 We will load the numbers from MaxPairWiseProductRandomNumbers.txt
- MaxPairWiseProduct4() - Constructor for class topics.introduction.MaxPairWiseProduct4
- MaxPairWiseProduct5 - Class in topics.introduction
-
Computes the max pairwise product among different numbers E.g.: 7 3 6 => 42 We will load the numbers from MaxPairWiseProductRandomNumbers.txt
- MaxPairWiseProduct5() - Constructor for class topics.introduction.MaxPairWiseProduct5
- MaxPairWiseProduct6 - Class in topics.introduction
-
Computes the max pairwise product among different numbers E.g.: 7 3 6 => 42 We will load the numbers from MaxPairWiseProductRandomNumbers.txt
- MaxPairWiseProduct6() - Constructor for class topics.introduction.MaxPairWiseProduct6
- MaxPairWiseProductRandomNumbers - Class in topics.introduction
-
Generates a test data file of random integers for the MaxPairWiseProduct problem.
- MaxPairWiseProductRandomNumbers() - Constructor for class topics.introduction.MaxPairWiseProductRandomNumbers
- MaxSum - Class in topics.divideconquer
-
DIVIDE AND CONQUER PROBLEM: MAXIMUM SUMMATION OF ALL THE SUBSEQUENCES OF n ELEMENTS
- MaxSum() - Constructor for class topics.divideconquer.MaxSum
- maxSum1(int[]) - Method in class topics.divideconquer.MaxSum
-
This algorithms is iterative.
- maxSum2(int[]) - Method in class topics.divideconquer.MaxSum
-
This algorithms is iterative.
- maxSum3(int[]) - Method in class topics.divideconquer.MaxSum
-
This algorithms is recursive.
- Median - Class in topics.divideconquer
-
//DIVIDE AND CONQUER PROBLEM: THE MEDIAN OF n ELEMENTS
- Median() - Constructor for class topics.divideconquer.Median
- median1(int[]) - Method in class topics.divideconquer.Median
-
This method sorts the vector O(nlogn) and then it is a very basic operation O(1), so its calculation is O(nlogn) + O(1) - O(nlogn)
- median2(int[]) - Method in class topics.divideconquer.Median
-
This method is recursive and is based on the concept of partition seen for the Quicksort algorithm.
- mergesort(int[]) - Method in class topics.divideconquer.Mergesort
-
Sorts the input array using mergesort.
- Mergesort - Class in topics.divideconquer
-
Mergesort algorithm using divide-and-conquer.
- Mergesort() - Constructor for class topics.divideconquer.Mergesort
- Mode - Class in topics.divideconquer
-
//DIVIDE AND CONQUER PROBLEM: MODE OF n ELEMENTS
- Mode() - Constructor for class topics.divideconquer.Mode
- mode1(int[], int[]) - Method in class topics.divideconquer.Mode
-
This method iteratively computes the predominant element (mode).
- mode2(int[], int[]) - Method in class topics.divideconquer.Mode
-
This method previously orders the vector O(nlogn) and then it looks for the mode O(n).
N
- n - Variable in class topics.parallel.FibonacciAlgorithm
- naiveGCD(long, long) - Method in class topics.divideconquer.GCG
-
Naive algorithm to solve the GCG problem
- Node - Class in topics.branchandbound.util
-
To represent the different states of a problem in the graph For each problem, we should extend this class with specific information We also need to compare Nodes because it is the way to compare them in the priority queue
- Node() - Constructor for class topics.branchandbound.util.Node
-
Constructor for Node objects
- nodes - Variable in class topics.branchandbound.util.Heap
O
- orderInWhichTasksAreHandledBADWAY(int[], int[]) - Method in class topics.greedy.SomePlumbers
-
Sorts the tasks in a random order.
- orderInWhichTasksAreHandledBESTWAY(int[], int[]) - Method in class topics.greedy.SomePlumbers
-
Sorts the tasks from smallest to biggest O(n) + O(nlogn) - O(nlogn)
P
- parentID - Variable in class topics.branchandbound.util.Node
- partition(int[], int, int) - Static method in class topics.divideconquer.utils.Util
- Permutations - Class in topics.backtracking
-
BACKTRACKING PROBLEM: PERMUTATIONS OF N ELEMENTS This program generates permutations of the integer elements that are in the vector v
- Permutations(int) - Constructor for class topics.backtracking.Permutations
-
Constructor for Permutations objects
- PermutationsTimes - Class in topics.backtracking.times
-
BACKTRACKING PROBLEM: PERMUTATIONS OF N ELEMENTS This program calculates times to generate the permutations of n elements.
- PermutationsTimes() - Constructor for class topics.backtracking.times.PermutationsTimes
- Plumber - Class in topics.greedy
-
Single-plumber scheduling utility.
- Plumber(int[]) - Constructor for class topics.greedy.Plumber
-
Builds a plumber instance with task durations.
- Principles & Fundamentals - Section in package topics.introduction
- printBestSol() - Method in class topics.backtracking.times.AgentsTasksTimes
-
Prints the best solution found
- printCosts() - Method in class topics.backtracking.times.AgentsTasksTimes
-
Prints cost matrix
- printSolutionTrace() - Method in class topics.branchandbound.util.BranchAndBound
-
Prints the solution from the root node to the best node
- printSolutionTrace() - Method in class topics.branchandbound.util.threads.BranchAndBoundThreads
-
Prints the solution from the root node to the best node
- PriorityQueueExample - Class in topics.introduction.examples
-
Demonstrates
PriorityQueuewith natural ordering. - PriorityQueueExample() - Constructor for class topics.introduction.examples.PriorityQueueExample
- pruneLimit - Variable in class topics.branchandbound.util.BranchAndBound
- pruneLimit - Static variable in class topics.branchandbound.util.threads.BranchAndBoundThreads
Q
- Quicksort - Class in topics.sorting
-
Quicksort sorting algorithm.
- Quicksort() - Constructor for class topics.sorting.Quicksort
R
- Radix - Class in topics.sorting.others
-
Sorting algorithm: Radix method
- Radix() - Constructor for class topics.sorting.others.Radix
- RectanglesPlacement - Class in topics.branchandbound
-
BRANCH AND BOUND PROBLEM: OPTIMAL PLACEMENT OF RECTANGLES
- RectanglesPlacement(int, List) - Constructor for class topics.branchandbound.RectanglesPlacement
-
Constructor for RectanglesPlacement objects
- RectanglesPlacementThreads - Class in topics.branchandbound
-
BRANCH AND BOUND PROBLEM: OPTIMAL PLACEMENT OF RECTANGLES
- RectanglesPlacementThreads(int, List) - Constructor for class topics.branchandbound.RectanglesPlacementThreads
-
Constructor for RectanglesPlacement objects
- Recurrence and the Master Theorem - Section in package topics.divideconquer
- Recurrence Relation - Section in class topics.dynamic.Change
- RecursiveActionComparison - Class in topics.parallel
-
To calculate the cube root of the values of an array
- RecursiveActionSquare - Class in topics.parallel
-
To calculate the square of the values of an array
- RecursiveActionSquare(int[], int, int) - Constructor for class topics.parallel.RecursiveActionSquare
- RecursiveTaskSum - Class in topics.parallel
-
To calculate the addition of the values of an array
- riverTravel(int[][], int[][]) - Method in class topics.dynamic.RiverTravel
-
The dynamic programming version has a cubic complexity O(n^3)
- RiverTravel - Class in topics.dynamic
-
DYNAMIC PROGRAMMING PROBLEM: CHEAPER TRAVEL ON THE RIVER It consists on finding the minimum cost for each pair of points
- RiverTravel() - Constructor for class topics.dynamic.RiverTravel
- rootNode - Variable in class topics.branchandbound.util.BranchAndBound
- rootNode - Static variable in class topics.branchandbound.util.threads.BranchAndBoundThreads
- run() - Method in class topics.branchandbound.util.threads.WorkerThread
S
- Search - Class in topics.introduction
-
To use different methods for searching numbers in an array
- Search() - Constructor for class topics.introduction.Search
- searchBinary(int[], int) - Method in class topics.introduction.Search
-
Performs a binary search in an array, reducing the complexity when the number is not there: O(nlogn)
- searchSequential(int[], int) - Method in class topics.introduction.Search
-
Performs a sequential search in an array
- searchSequentialSentinel(List, int) - Method in class topics.introduction.Search
-
Performs a sequential search in an array using a sentinel to avoid checking if we are inside the limits of the array
- SequentialSearch - Class in topics.divideconquer
-
DIVIDE AND CONQUER PROBLEM: CALCULATE THE POSITION OF AN ELEMENT x IN A VECTOR (SORTED OR UNSORTED) OF n DIFFERENT ELEMENTS
- SequentialSearch() - Constructor for class topics.divideconquer.SequentialSearch
- sequentialSearch1(int[], int) - Method in class topics.divideconquer.SequentialSearch
-
This method iteratively calculates the position of x in the vector.
- sequentialSearch2(int[], int) - Method in class topics.divideconquer.SequentialSearch
-
This method recursively calculates the position of x in a vector.
- Shellsort - Class in topics.sorting.others
-
Sorting algorithm: Shellsort method
- Shellsort() - Constructor for class topics.sorting.others.Shellsort
- solve() - Method in class topics.parallel.FibonacciAlgorithm
-
Initializes the process calling the recursive method
- SomePlumbers - Class in topics.greedy
-
GREEDY ALGORITHM PROBLEM: SOME DILIGENT PLUMBERS It has an optimal solution
- SomePlumbers() - Constructor for class topics.greedy.SomePlumbers
- sort(int[]) - Method in class topics.sorting.Bubble
-
Sorts an array of integers using bubble sort (without tracing).
- sort(int[]) - Method in class topics.sorting.DirectInsertion
- sort(int[]) - Method in class topics.sorting.DirectSelection
- sort(int[]) - Method in class topics.sorting.ImprovedBubble
- sort(int[]) - Method in class topics.sorting.others.BidirectionalBubble
- sort(int[]) - Method in class topics.sorting.others.BinaryInsertion
- sort(int[]) - Method in class topics.sorting.others.Heapsort
- sort(int[]) - Method in class topics.sorting.others.Radix
- sort(int[]) - Method in class topics.sorting.others.Shellsort
- sort(int[]) - Method in class topics.sorting.Quicksort
- sort(int[]) - Method in interface topics.sorting.utils.ISortingAlgorithm
-
Sorts elements without tracing anything
- sort(int[], boolean) - Method in class topics.sorting.Bubble
-
Sorts an array of integers using bubble sort with execution tracing.
- sort(int[], boolean) - Method in class topics.sorting.DirectInsertion
- sort(int[], boolean) - Method in class topics.sorting.DirectSelection
- sort(int[], boolean) - Method in class topics.sorting.ImprovedBubble
- sort(int[], boolean) - Method in class topics.sorting.others.BidirectionalBubble
- sort(int[], boolean) - Method in class topics.sorting.others.BinaryInsertion
- sort(int[], boolean) - Method in class topics.sorting.others.Heapsort
- sort(int[], boolean) - Method in class topics.sorting.others.Radix
- sort(int[], boolean) - Method in class topics.sorting.others.Shellsort
- sort(int[], boolean) - Method in class topics.sorting.Quicksort
- sort(int[], boolean) - Method in interface topics.sorting.utils.ISortingAlgorithm
-
Sorts elements with the possibility of tracing the operation
- StackExample - Class in topics.introduction.examples
- StackExample() - Constructor for class topics.introduction.examples.StackExample
- SubsetsGivenSum - Class in topics.backtracking
-
BACKTRACKING PROBLEM: SUBSETS OF A GIVEN SUM This program, given a set consisting of n different positive integers, computes all subsets which sum a given value c
- SubsetsGivenSum(int, int) - Constructor for class topics.backtracking.SubsetsGivenSum
-
Constructor for SubsetsGivenSum objects
- sum(int[]) - Method in class topics.introduction.GetAdditionFromList
-
To sum up the total value of the numbers contained in an array
- sum(int, int) - Method in class topics.introduction.HelloWorld
-
Adds two integer numbers and return the result
- sum1(int[]) - Method in class topics.divideconquer.VectorSum
-
This method iteratively calculates the sum with a linear complexity O(n)
- sum2(int[]) - Method in class topics.divideconquer.VectorSum
-
This method recursively calculates the sum with a linear complexity O(n).
- sum3(int[]) - Method in class topics.divideconquer.VectorSum
-
This method recursively calculates the sum with a linear complexity O(n).
T
- topics.backtracking - package topics.backtracking
-
Backtracking algorithms — systematic exploration of solution spaces with pruning.
- topics.backtracking.times - package topics.backtracking.times
-
Execution-time benchmarks for backtracking algorithms.
- topics.branchandbound - package topics.branchandbound
-
Branch-and-Bound algorithms — intelligent search for combinatorial optimisation.
- topics.branchandbound.times - package topics.branchandbound.times
-
Execution-time benchmarks for branch-and-bound algorithms.
- topics.branchandbound.util - package topics.branchandbound.util
-
Utility classes shared by branch-and-bound implementations.
- topics.branchandbound.util.threads - package topics.branchandbound.util.threads
-
Multi-threaded branch-and-bound utilities.
- topics.divideconquer - package topics.divideconquer
-
Divide-and-Conquer algorithms — break, solve, and combine.
- topics.divideconquer.utils - package topics.divideconquer.utils
-
Utility classes shared by divide-and-conquer implementations.
- topics.dynamic - package topics.dynamic
-
Dynamic Programming algorithms — optimisation via overlapping sub-problems.
- topics.greedy - package topics.greedy
-
Greedy algorithms — globally optimal solutions through locally optimal choices.
- topics.greedy.agentsTasks - package topics.greedy.agentsTasks
-
Execution-time benchmarks for greedy agents-to-tasks assignment.
- topics.introduction - package topics.introduction
-
Introduction to algorithms, computational thinking, and fundamental data structures.
- topics.introduction.examples - package topics.introduction.examples
-
Worked examples illustrating core Java data-structure APIs.
- topics.parallel - package topics.parallel
-
Parallel algorithms using Java's Fork/Join Framework.
- topics.sorting - package topics.sorting
-
Sorting algorithms — from simple quadratic to optimal linearithmic.
- topics.sorting.others - package topics.sorting.others
-
Additional sorting algorithms beyond the core set.
- topics.sorting.utils - package topics.sorting.utils
-
Utility classes shared by sorting implementations.
- trace(int, int[]) - Static method in class topics.sorting.utils.Util
-
Logs messages for the sorting algorithm
- traceMessage(String, int[]) - Static method in class topics.sorting.utils.Util
-
Logs string messages for some sorting algorithms
- traceShellSort(int, int, int[]) - Static method in class topics.sorting.utils.Util
-
Logs messages for the Shell sorting algorithm
- TreeSetExample - Class in topics.introduction.examples
-
Demonstrates
TreeSetwith natural sorted ordering. - TreeSetExample() - Constructor for class topics.introduction.examples.TreeSetExample
- Two Complementary Approaches - Section in package topics.dynamic
U
- Util - Class in topics.divideconquer.utils
-
Utility class for divide-and-conquer sorting helpers.
- Util - Class in topics.sorting.utils
-
Helper class to trace and use common operations among sorting algorithms
- Util() - Constructor for class topics.divideconquer.utils.Util
- Util() - Constructor for class topics.sorting.utils.Util
V
- VectorExample - Class in topics.introduction.examples
-
Demonstrates the legacy thread-safe
Vectorcollection. - VectorExample() - Constructor for class topics.introduction.examples.VectorExample
- VectorSum - Class in topics.divideconquer
-
DIVIDE AND CONQUER PROBLEM: CALCULATE THE SUM OF n ELEMENTS IN A VECTOR
- VectorSum() - Constructor for class topics.divideconquer.VectorSum
W
- When Greedy Fails - Section in package topics.greedy
- When Greedy Works - Section in package topics.greedy
- When to Use Backtracking - Section in package topics.backtracking
- Why Dynamic Programming Works - Section in class topics.dynamic.Change
- Why Greedy Fails - Section in class topics.dynamic.Change
- WorkerThread - Class in topics.branchandbound.util.threads
-
Worker thread for the parallel Branch and Bound search.
- WorkerThread() - Constructor for class topics.branchandbound.util.threads.WorkerThread
- writeMatrix(int[][]) - Method in class topics.dynamic.RiverTravel
-
Prints one of the matrix
- writeSolution() - Method in class topics.greedy.ChessHorse
- writeSolution() - Method in class topics.greedy.ChessHorseSimpleHeuristic
- writeSolution(long[][], int, int) - Method in class topics.dynamic.Combinations
-
Shows the result combinations of n elements taken k by k
All Classes and Interfaces|All Packages|Serialized Form