sampling algoritm based on indexed constrains

Discussion in 'Java' started by Albretch, Nov 29, 2004.

  1. Albretch

    Albretch Guest

    I know this might not exactly be a question to this newsgroup, but,
    again, I don't know how to solve this type of problems. I need to
    understand it well, because I see myself using this a lot

    I have been thinking about an implementation of a sampling algorithm
    that would conditionally constrain selections preferably in Java (ANSI
    C/C++ are fine, too).

    Say, you have a number of items you may conditionally select. Cases
    would be:

    1._ you may select any and any number of them,
    2._ you may select any, but only a given number of them, say 1, 2 or 3
    3._ you either select the first or second and any other one,
    4._ you may select any as long as the total of certain weight remains
    in a range
    5._ you -must- select all
    . . .

    As you can see it is not only about the items themselves but there
    are also aggregations involved.

    It would pretty much be like an indexing of possible WHERE clauses in
    SQL. I could imagine other people have stumbled on these kinds of
    problems before.

    I have been thinking about implementing a solution to the problem based
    on the "language (or grammar how is it called?) pattern" using the
    knapsack algorithm to try keep things tidy.

    I did search and could not find anything similar to what I was looking for.
    Maybe you know of something like this or can avail me of some leads in
    the right direction.
    Albretch, Nov 29, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ALuPin

    Over-Sampling

    ALuPin, Mar 11, 2005, in forum: VHDL
    Replies:
    5
    Views:
    1,901
  2. steflhermitte
    Replies:
    1
    Views:
    813
    Kanenas
    Apr 21, 2005
  3. Steven Bethard

    sampling items from a nested list

    Steven Bethard, Feb 16, 2005, in forum: Python
    Replies:
    5
    Views:
    317
    Felix Wiemann
    Feb 17, 2005
  4. Replies:
    0
    Views:
    446
  5. Brian Quinlan

    Sampling a population

    Brian Quinlan, Jun 2, 2006, in forum: Python
    Replies:
    5
    Views:
    313
    Roger Miller
    Jun 2, 2006
Loading...

Share This Page