SAR<em>bayes</em>: SORAL Documentation
(SARBayes) Main Related Pages Class List Hierarchy Methods Files

sample.cpp File Reference


Detailed Description

This is a simple sample of how to use SORAL.

This program creates an allocation, and then prints it by walking over the results.

Version History

 *-----+----------+-----+-----------------------------------------------------
 * Who |   When   | Ver | What
 *-----+----------+-----+-----------------------------------------------------
 * ASO | 18/1/03  |  1  | Created as TestBed.cpp
 *-----+----------+-----+-----------------------------------------------------
 * crt |  7apr03  |  2  | Made sample.cpp (TestBed is now for real testing).
 *-----+----------+-----+-----------------------------------------------------
 * crt | 03may03  |  3  | Simplified printAssignments.
 *-----+----------+-----+-----------------------------------------------------
 * 

Definition in file sample.cpp.

#include <iostream>
#include <vector>
#include "containr.h"
#include "Allocatn.h"
#include "Array2D.h"
#include "Alloc-W.h"
#include "Alloc-CC.h"
#include "UserDef.h"

Include dependency graph for sample.cpp:

Include dependency graph

Go to the source code of this file.

Functions

void printAssignments (const Allocation &theAllocation)
 Prints the assignments in an Allocation.

int main ()


Function Documentation

void printAssignments const Allocation   theAllocation
 

Prints the assignments in an Allocation.

Prints all and only the assignments in an Allocation, by using the standard iterator paradigm: start with ActiveAreasIterator and proceed from there.

Since this program now compares answers numerically, and only prints the offending allocations, maybe we can remove this function, which now lives usefully in sample.cpp?

Todo:
Remove printAssignments from here?
Author: Andre Oboler

Definition at line 136 of file sample.cpp.

References ResourceIterator::atEnd(), ActiveAreasIterator::atEnd(), ActiveArea::getActiveAreaNum(), ResourceAssignment::getResourceNum(), and ResourceAssignment::getTime().


Generated on Fri May 9 17:04:18 2003 for SORAL by dOxygen 1.3-rc3
(SARBayes) Main Related Pages Class List Hierarchy Methods Files