zoukankan      html  css  js  c++  java
  • Js笛卡尔乘积

      self.getDescartesSku = function (selSaleProp, i, nowLst, allALst) {
            if (selSaleProp.length == 0) {
                return;
            }
            if (i == selSaleProp.length - 1) {
                for (var tempi = 0; tempi < selSaleProp[i].values.length; tempi++) {
                    var tempA = nowLst.concat(selSaleProp[i].values[tempi]);
                    allALst.push({ SaleProps: tempA });
                }
            } else {
                for (var tempi = 0; tempi < selSaleProp[i].values.length; tempi++) {
                    var tempA = nowLst.concat(selSaleProp[i].values[tempi]);
                    self.getDescartesSku(selSaleProp, (i + 1), tempA, allALst);
                }
            }
        };

    版权声明:本文为博主原创文章,未经博主允许不得转载。

  • 相关阅读:
    倒序三角形
    有时间了
    测试一个数是不是素数
    初学C++编写小程序
    N!的递归调用
    1+...+5的递归调用
    1!+....+5!
    菱形块
    23.git简单使用
    27.flask学习
  • 原文地址:https://www.cnblogs.com/liningit/p/4861748.html
Copyright © 2011-2022 走看看