jenkinsci / jenkinsci/matrix-project-plugin
[JENKINS-1712] Try to make the matrix rectangular
- Dominant language
- Java
- Stars
- 17
- Forks
- 85
- Avg merge
- 4h 27m
- Merged PRs (30d)
- 5
Description
Try to classify axes into X and Y in a nice way so that the resulting table
would look rectangular.
This is essentially a knapsack problem and can be solved recursively with
memoization via dynamic programming:
http://en.wikipedia.org/wiki/Knapsack_problem#Dynamic_programming_solution
===============
Define a recursive function, A(i,j) to be the maximum value that can be attained
with cost less than or equal to j using items up to i.
We can define A(i,j) recursively as follows:
- A(0,j) = 0
- A(i,0) = 0
- A(i,j) = A(i-1,j) if c_i > j
- A(i,j) = max(A(i-1,j), v_i + A(i-1, j-c_i)) if c_i <= j.
===============
---
Originally reported by
kohsuke, imported from: Try to make the matrix rectangular
Raw content of original issue
Try to classify axes into X and Y in a nice way so that the resulting table
would look rectangular.This is essentially a knapsack problem and can be solved recursively with
memoization via dynamic programming:http://en.wikipedia.org/wiki/Knapsack_problem#Dynamic_programming_solution
===============
Define a recursive function, A(i,j) to be the maximum value that can be attained
with cost less than or equal to j using items up to i.We can define A(i,j) recursively as follows:
- A(0,j) = 0
- A(i,0) = 0
- A(i,j) = A(i-1,j) if c_i > j
- A(i,j) = max(A(i-1,j), v_i + A(i-1, j-c_i)) if c_i <= j.
===============
- environment:
Platform: All, OS: All
Contributor guide
Assessment
This issue has not been assessed yet.