MipBaselib::Pocket Struct Reference

This struct represents a pocket of a weighted roulette. More...

#include <Roulette.h>

List of all members.

Public Member Functions

 Pocket ()
 Default constructor.
 Pocket (int v)
 Num constructor.
 Pocket (int v, Decimal w)
 Complete constructor.
 Pocket (const Pocket &v)
 Copy constructor.
const Pocketoperator= (const Pocket &v)
 Assignment operator =.
string print ()
 Print function.

Public Attributes

int value
 Represents the value of the Pocket.
Decimal weight
 Represents the weight of the Pocket.


Detailed Description

This struct represents a pocket of a weighted roulette.

Author:
Paolo Stegagno

Constructor & Destructor Documentation

MipBaselib::Pocket::Pocket (  ) 

Default constructor.

Sets value = 0, weight = 0.

MipBaselib::Pocket::Pocket ( int  v  ) 

Num constructor.

Parameters:
v value to be set. Sets value = v, weight = 0.

MipBaselib::Pocket::Pocket ( int  v,
Decimal  w 
)

Complete constructor.

Parameters:
v value to be set.
w weight to be set. Sets value = n, weight = w.

MipBaselib::Pocket::Pocket ( const Pocket v  ) 

Copy constructor.

Parameters:
v value to be set.


Member Function Documentation

const Pocket & MipBaselib::Pocket::operator= ( const Pocket v  ) 

Assignment operator =.

Parameters:
v value to be set.

string MipBaselib::Pocket::print (  ) 

Print function.

Returns:
A printable string.


Member Data Documentation

Represents the value of the Pocket.

Represents the weight of the Pocket.


The documentation for this struct was generated from the following files:

Generated on Mon Feb 20 07:01:11 2017 for MIP by  doxygen 1.5.6