Find Jobs
Hire Freelancers

C++ class to enumerate sets

$30-75 USD

Ολοκληρώθηκε
Αναρτήθηκε περίπου 17 χρόνια πριν

$30-75 USD

Πληρωμή κατά την παράδοση
The project is building an object which returns all enumerated n-sized subsets of a vector. Calling next should go to next lexicographically ordered unique subset. These subsets are represented as vectors of iterators of the original type. The original ContainerT is a std::vector. Construction should be O(N), and next should be O(N). Constructor should throw exception if set_size > [login to view URL](). template class enumerated_subset { public: typedef typename ContainerT::iterator container_iter_type ; typedef typename std::vector subset_type ; enumerated_subset ( std::size_t set_size, ContainerT & container ) ; bool next ( ) ; /// Return true so long as not last iteration subset_type const & current ( ) const ; /// return reference to local current subset state private: subset_type current_subset; ContainerT * mp_container; } ; Ex. If there is a vector container elements : [0,1,2,3,4]. An enumerated subset class of size 1, would have 5 different values of current vector of iterators, after which operator++ would return false. Those iterations the values would pointer to : [0],[1],[2],[3],[4] If this were created with subsets of size 2. It would be : [0,1],[0,2],[1,2],[0,3], [1,3],[2,3],[0,4],[1,4],[2,4],[3,4] If this were created with subsets of size 3. It would be: [0,1,2], [0,1,3], [0,2,3], [1,2,3], [0,1,4],[0,2,4],[0,3,4], [1,2,4], [1,3,4], [2,3,4] If you draw these out in a table with the pattern will become obvious to you ( I hope ). The sets closer to the beginning of the series are more tightly coupled to the lower iterators. The project also requires that you write a small program that uses this type to print out the above examples, and extend it for sets of size 3, 4, and 5. This must be platform independenct C++ code, only C++ standard headers and STL headers are allowed. In the example code please use iostream. ## Deliverables 1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. 2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables): a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment. b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request. 3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement). ## Platform Platform independent, g++ compiled code that runs on a gcc 4.0 or greater release.
Ταυτότητα εργασίας: 2951117

Σχετικά με την εργασία

6 προτάσεις
Απομακρυσμένη Εργασία
Ενεργός/ή 17 χρόνια πριν

Ψάχνεις τρόπο για να κερδίσεις μερικά χρήματα;

Πλεονεκτήματα πλειοδοσίας στο Freelancer

Καθόρισε τον προϋπολογισμό σου και το χρονοδιάγραμμα
Πληρώσου για τη δουλειά σου
Περίγραψε την πρόταση σου
Η εγγραφή και η πλειοδοσία σε εργασίες είναι δωρεάν
Βραβεύτηκε στον/στην:
Avatar Χρήστη
See private message.
$42,50 USD σε 4 ημέρες
4,9 (46 αξιολογήσεις)
4,6
4,6
6 freelancers δίνουν μια μέση προσφορά $34 USD για αυτή τη δουλειά
Avatar Χρήστη
See private message.
$29,75 USD σε 4 ημέρες
5,0 (73 αξιολογήσεις)
4,1
4,1
Avatar Χρήστη
See private message.
$33,15 USD σε 4 ημέρες
4,6 (7 αξιολογήσεις)
3,4
3,4
Avatar Χρήστη
See private message.
$25,50 USD σε 4 ημέρες
5,0 (8 αξιολογήσεις)
1,6
1,6
Avatar Χρήστη
See private message.
$29,75 USD σε 4 ημέρες
5,0 (3 αξιολογήσεις)
0,8
0,8
Avatar Χρήστη
See private message.
$42,50 USD σε 4 ημέρες
3,0 (1 αξιολόγηση)
1,1
1,1

Σχετικά με τον πελάτη

Σημαία της UNITED STATES
Mountain View, United States
5,0
6
Μέλος από Οκτ 18, 2006

Επαλήθευση Πελάτη

Ευχαριστούμε! Σου έχουμε στείλει ένα email με ένα σύνδεσμο για να διεκδικήσεις τη δωρεάν πίστωση σου.
Κάτι πήγε στραβά κατά την προσπάθεια αποστολής του email σου. Παρακαλούμε δοκίμασε ξανά.
Εγγεγραμμένοι Χρήστες Συνολικές Αναρτημένες Δουλειές
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Φόρτωση προεπισκόπησης
Δόθηκε πρόσβαση για Geolocation.
Η σύνδεση σου έχει λήξει και τώρα έχεις αποσυνδεθεί. Παρακαλούμε συνδέσου ξανά.