フィルターのクリア

convert java code to matlab code

1 回表示 (過去 30 日間)
nadia nadi
nadia nadi 2022 年 5 月 6 日
Hello,
I need to convert this code to matlab. I have no idea about java. could anyone help me please.
public class NextFit extends Packing {
protected final boolean shouldDecrease = false;
public NextFit(double[] items) {
super(items);
}
@Override
protected void pack(double item) {
int binSize = this.bins.size();
boolean canFit = binSize > 0 && this.bins.get(binSize - 1).remainingCapacity >= item;
int binIndex = binSize - (canFit ? 1 : 0);
this.addItem(item, binIndex);
}
@Override
protected boolean shouldDecrease() {
return this.shouldDecrease;
}
}
Thanks

回答 (0 件)

カテゴリ

Help Center および File ExchangeMathematics についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by