// test the class arrayList that uses STL algorithms #include #include "linearList.h" #include "arrayList.h" using namespace…
capacity 源代码
capacity是一种函数,功能是返回string分配的存储容量。
// greedy container loading #include #include "container.h" #include "heapSort.h" using namespace std; void container…
// array implementation of a stack // derives from the ADT stack #ifndef arrayStack_ #define arrayStack_ #include "stack.h…
// first recursive backtracking code to load containers onto 2 ships // code finds weight of max loading for first ship only #…
// refined recursive backtracking code for container loading // onto two ships // code finds weight of max loading for first shi…
// iterative code for container loading by backtracking #include #include using namespace std; int maxLoading(int *w…
#include #include #include //goods是一个或多个物品的重量和价值 typedef struct goods { int weight; int value; } goods; //用来…
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % in this programe a highly scattered enviroment …
% MATLAB script for Illustrative Problem 1, Chapter 8. echo on gamma_db=[-20:0.1:20]; gamma=10.^(gamma_db./10); p_error=q(sqr…
% MATLAB script for Illustrative Problem 4, Chapter 8. echo on a_db=[-13:0.5:13]; a=10.^(a_db/10); c_hard=1-entropy2(q(a)); …