Logo Search packages:      
Sourcecode: kbruch version File versions  Download package

Public Member Functions | Private Member Functions | Private Attributes

task Class Reference

#include <task.h>

List of all members.

Public Member Functions

void add_operation (short operation=ADD)
void add_ratio (ratio new_ratio)
void add_ratio (int numerator=0, int denominator=1)
void clean ()
void create_task (unsigned int pmax_md=10, short pnr_ratios=2, short padd_add=YES, short padd_div=NO, short padd_mult=NO, short padd_sub=NO)
QTextStream & display (QTextStream &str)
short get_op_n (unsigned short number=0) const
ratio get_ratio_n (unsigned short number=0) const
int getNumberOfOperations () const
int getNumberOfRatios () const
void set_op_n (unsigned short number=0, short operation=ADD)
void set_ratio_n (unsigned short number=0, int numerator=0, int denominator=1)
void set_ratio_n (unsigned short number, ratio fraction)
ratio solve ()
 task ()
 ~task ()

Private Member Functions

void make_denominators (int main_denominator=0, short pmax_md=0, short padd_div=NO, short padd_mult=NO)
int make_main_dn (unsigned int pmax_md, unsigned short max_product_length)
void make_numerators (int main_denominator, short pnr_ratios)
unsigned short make_operation (short padd_add=YES, short padd_div=NO, short padd_mult=NO, short padd_sub=NO, short pnr_ratios=0)
unsigned short prim_factor_nr (int number=1)
ratio product (RatioArray::iterator &ratio_pointer, ShortArray::iterator &op_pointer)

Private Attributes

short add_add
short add_div
short add_mult
short add_sub
int max_md
short nr_ratios
ShortArray op_vector
PrimeFactorArray prim_fac_vector
RatioArray ratio_vector

Detailed Description

class to handle mathematical tasks with ratios naming:

Author:
Sebastian Stein

Definition at line 70 of file task.h.


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

Generated by  Doxygen 1.6.0   Back to index