Add automatic linter (#4214)

This commit is contained in:
acbin
2023-06-09 20:05:14 +08:00
committed by GitHub
parent 00282efd8b
commit 415a04ea7f
188 changed files with 661 additions and 1133 deletions

View File

@ -25,8 +25,7 @@ public class OptimalJobScheduling {
* @param Transfer ,M*M symmetric matrix refers to the transportation delay for each pair of
* machines
*/
public OptimalJobScheduling(
int numberProcesses, int numberMachines, int[][] Run, int[][] Transfer) {
public OptimalJobScheduling(int numberProcesses, int numberMachines, int[][] Run, int[][] Transfer) {
this.numberProcesses = numberProcesses;
this.numberMachines = numberMachines;
this.Run = Run;
@ -75,15 +74,13 @@ public class OptimalJobScheduling {
return Run[process][machine];
else {
int[] runningCosts
= new int[numberMachines]; // stores the costs of executing our Process depending on
// the Machine the previous one was executed
int[] runningCosts = new int[numberMachines]; // stores the costs of executing our Process depending on
// the Machine the previous one was executed
for (int k = 0; k < numberMachines; k++) // computes the cost of executing the previous
// process to each and every Machine
runningCosts[k] = Cost[process - 1][k] + Transfer[k][machine]
+ Run[process][machine]; // transferring the result to our Machine and executing
// the Process to our Machine
runningCosts[k] = Cost[process - 1][k] + Transfer[k][machine] + Run[process][machine]; // transferring the result to our Machine and executing
// the Process to our Machine
return findMin(runningCosts); // returns the minimum running cost
}