置换算法需要帮助 [英] Help required for permutation algorithm

查看:57
本文介绍了置换算法需要帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问题描述:



我有树名单(实际上是下拉列表)假设a,b&c,最初分别有x,y和z项目。



当我从其中一个列表中选择任何一个选项时,可能会发生以下两种情况之一:

a。其他列表中的选项保持不变

b。其他列表中的一个或多个选项从列表中被筛选(即删除)

此项目的删除是不可预测的。现在,用户可以在另一个列表中选择一个选项,从而产生更多过滤,等等。



考虑选择事项的顺序。我想有一个算法可以让我找到用户可以从这三个列表中选择所有可能的组合的方法。



我已经考虑过这个,但是没有取得任何成功。任何帮助将不胜感激!

解决方案

只需谷歌搜索您可能会发现许多可用的Java实现'permutation algorithm' [ ^ ]。

但是,在我看来,你对自己的要求并不清楚。

The problem description:

I have tree lists (dropdowns, actually) suppose a,b & c , initially having x,y & z number of items respectively.

When i select any option from one of the lists, one of the two things can happen:
a. The options in the other lists remain the same
b. The one or more options in the other lists gets flitered (i.e. removed) from the list
This removal of items is not predictable. Now the user can select an option in the other list, resulting in more filtering, and so on.

Considering that the sequence of selection of matters. I would like to have an algorithm that could get me the ways in which the user can select all possible combiantions from these three lists.

I have thought about this, but did not get any success. Any help would be greatly appreciated!

解决方案

Just Googling you may find many available Java implementation of a 'permutation algorithm'[^].
However, it looks to me, you have not a clear idea of your own requirements.


这篇关于置换算法需要帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆