+ this.lineCostStorage[i] = Array(itemsLength).fill(null);
+ }
+
+ this.totalCostAuxStorage = Array(itemsLength).fill(null);
+
+ let a = Infinity;
+ for(var k=itemsLength-2; this.lineCost(items, k+1,itemsLength-1, lineWidthFixed) < Infinity; k--){
+ let tmp = this.totalCostAux(items, k, lineWidthFixed);
+
+ if (a > tmp){
+ this.prevNodes[itemsLength-1] = k
+ a = tmp;
+ }