这就是我想要实现的目标 [英] this is what i am trying to achieve

查看:48
本文介绍了这就是我想要实现的目标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的感谢大家到目前为止的建议。这就是我想要b $ b做的事情,并且这个新手可能还有一个更好的方法,这个新手还没读过

或者想过。


i我从x个供应商那里得到价格,所有供应商都给我报价每个y项目的不同个别价格。没有一个供应商总是比其他供应商便宜。


没有。供应商:x(最好是无限制)


没有。项目:y(再次,最好是无限制)


我然后计算混合

供应商的所有不同项目组合。计算出组合数量的公式=


no.of供应商^(对于权力)没有。物品。


这需要创建一个y维度数组,每个元素包含x个元素,以存储所有组合

$ b你现在已经理解了$ b,到目前为止我只能达到x =

11,y = 7才会遇到内存限制。


项目必须能够像在购物车中一样添加/删除,直到用户

结帐,因此不能进行运行计算以尝试和紧缩

数字作为我走。这就是为什么我看不出阵列是如何形成任何小b / b
的原因。

希望这一切都有意义。任何以更好的方式做到这一点的想法都会很高兴。

顺便说一句,有没有办法将数组中的所有元素初始化为

一举零而不是循环通过它们?


非常感谢tc。

解决方案

tony collier写道:

希望这一切都有道理。我会非常感谢任何以更好的方式做到这一点的想法。




这是一篇重复的帖子还是你不喜欢你的建议收到

到目前为止?


您要求的更好的方法是使用包含表格的数据集

项目和供应商。此外,第三个表格将包含行

,表示可以从哪些供应商处获得哪些商品以及什么价格,交货时间等等。


这会大大减少你操纵的信息量

,因为假设所有项目都可以从所有项目中获得
供应商。它还消除了许多不必要的b $ b复杂性,因为您可以使用标准SQL提取信息。


此解决方案简单,可扩展且可维护。


-

有10种人。那些懂二元的人和那些没有b $ b的人。

http://code.acadx.com

(拉针回复)


听起来像是一个有趣的问题,这是一所高中还是大学

作业? - )

" tony collier" <我***** @ hotmail.com>在消息中写道

news:Xn ************************* @ 140.99.99.130 ...

好的。感谢大家到目前为止的建议。这就是我想要做的事情,并且这个新手可能还有一个更好的方式来阅读或思考。

我从中获取价格x多个供应商都为我提供了每个y项目的不同个别价格。没有一个供应商总是比其他供应商便宜。

没有。供应商:x(最好无限制)

没有。项目:y(再次,最好是无限制)

我然后计算来自混合供应商的所有不同项目组合。计算出组合数量的公式=

供应商的数量^(对于权力)没有。项目。

这需要创建一个y维度的数组,每个维度都有x个元素来存储所有组合

正如您现在所理解的那样,我到目前为止在遇到内存限制之前,只能进行x =
11和y = 7.

项目必须能够像购物车一样添加/删除,直到用户
结账,所以没有正在进行的计算可以尝试和我紧张的数字。这就是为什么我看不出阵列可以变得更小的原因。
希望这一切都有意义。任何以更好的方式做到这一点的想法都会非常感激。

顺便说一句,有没有什么方法可以将阵列中的所有元素初始化为零,一举一动非常感谢tc。



no - 我只是一个扩展功能的个人项目

我创建的网站。


ok . thanks everyone for your advice so far. this is what i am trying to
do and there is probably a much better way which this newbie hasn''t read
or thought about yet.

i am getting prices from x number of suppliers who all quote me a
different individual price for each of y items. no one supplier is always
cheaper than the others.

no. of suppliers: x (preferably unlimited)

no. of items: y (again, preferably unlimited)

i then calculate all the different combination of items from mixed
suppliers. The formula to work out number of combinations =

no.of supplier ^ (to the power of) no. of items.

this requires creating an array of y dimensions with x elements per
dimension to store all combinations

as you will now understand , i have so far only been able to go up to x=
11, and y=7 before running into memory constraints.

items must be able to be added/deleted like in a cart until user
checksout, so no running calculation can take place to try and crunch
numbers as i go. this is why i can''t see how array can be made any
smaller.

hope this all makes sense. any ideas to do this in a better way would be
greatly appreciated.
Incidentally, is there any way to initalize all elements in the array to
zero in one fell swoop rather than looping through them?

many thanks tc.

解决方案

tony collier wrote:

hope this all makes sense. any ideas to do this in a better way
would be greatly appreciated.



Is this a triplicate post or did you not like the advice you''ve received
thus far?

The better way you ask for is to use a DataSet containing a table for
items and suppliers. In addition, a third table will hold rows
indicating which items may be obtained from which suppliers and at what
price, lead time, etc.

This cuts the amount of information you''re manipulating dramatically
since it does not operate on the assumption that all items may be
procured from all suppliers. It also removes a lot of unneeded
complexity since you can pull information using standard SQL.

This solution is simple, scalable and maintainable.

--
There are 10 kinds of people. Those who understand binary and those who
don''t.

http://code.acadx.com
(Pull the pin to reply)


Sounds like an interesting problem, is this a high school or college
assignment ?-)
"tony collier" <me*****@hotmail.com> wrote in message
news:Xn*************************@140.99.99.130...

ok . thanks everyone for your advice so far. this is what i am trying to
do and there is probably a much better way which this newbie hasn''t read
or thought about yet.

i am getting prices from x number of suppliers who all quote me a
different individual price for each of y items. no one supplier is always
cheaper than the others.

no. of suppliers: x (preferably unlimited)

no. of items: y (again, preferably unlimited)

i then calculate all the different combination of items from mixed
suppliers. The formula to work out number of combinations =

no.of supplier ^ (to the power of) no. of items.

this requires creating an array of y dimensions with x elements per
dimension to store all combinations

as you will now understand , i have so far only been able to go up to x=
11, and y=7 before running into memory constraints.

items must be able to be added/deleted like in a cart until user
checksout, so no running calculation can take place to try and crunch
numbers as i go. this is why i can''t see how array can be made any
smaller.

hope this all makes sense. any ideas to do this in a better way would be
greatly appreciated.
Incidentally, is there any way to initalize all elements in the array to
zero in one fell swoop rather than looping through them?

many thanks tc.



no - i is just a personal project to extend the functionality of a
website i have created.


这篇关于这就是我想要实现的目标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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