R
Relative0
I have a rather elusive problem and have spent some amount of time on
it, I would very kindly appreciate it if anyone could give me insight
on how to solve this problem. I tried to include what I thought was
necessary without overkilling it. Basically it seems as if a "lattice"
is being created. the tgrundgitter(~,~,~,~) is declared in another
header file. as well as heightfct(~,~). I don't understand what is
going on in the lattice->gethightfct(heightfct); and furthermore what
I really really want to do is get the 2Dimensional array "t2darray"
with all the elements in it and then transport them into the
d2_RootMeanSquare(int n, ?) function. I put ? in the function because
I don't know how to do this, I don't understand the syntax... Could
someone please help me out on how to do this and explain it to me???
Thanks,
Brian
lattice = new
tgrundgitter(latticeparameter.atomex,latticeparameter.atomey,latticeparameter.atomez,latticeparameter.gridtype);
t2darray<short>
heightfct(latticeparameter.atomex,latticeparameter.atomey);
lattice->gethightfct(heightfct);
TwoDimRMS.d2_RootMeanSquare(16,heightfct);
//---------- "In Header File".
public:
int d2_RootMeanSquare(int n, int vector[][16]);
int d2_RMS::d2_RootMeanSquare(int n, int vector[][16]){
for (a=0;a<n;a++){
x = 0;
for (b=0;b<n;b++){
x = x + pow(vector[a],2);
}}
it, I would very kindly appreciate it if anyone could give me insight
on how to solve this problem. I tried to include what I thought was
necessary without overkilling it. Basically it seems as if a "lattice"
is being created. the tgrundgitter(~,~,~,~) is declared in another
header file. as well as heightfct(~,~). I don't understand what is
going on in the lattice->gethightfct(heightfct); and furthermore what
I really really want to do is get the 2Dimensional array "t2darray"
with all the elements in it and then transport them into the
d2_RootMeanSquare(int n, ?) function. I put ? in the function because
I don't know how to do this, I don't understand the syntax... Could
someone please help me out on how to do this and explain it to me???
Thanks,
Brian
lattice = new
tgrundgitter(latticeparameter.atomex,latticeparameter.atomey,latticeparameter.atomez,latticeparameter.gridtype);
t2darray<short>
heightfct(latticeparameter.atomex,latticeparameter.atomey);
lattice->gethightfct(heightfct);
TwoDimRMS.d2_RootMeanSquare(16,heightfct);
//---------- "In Header File".
public:
int d2_RootMeanSquare(int n, int vector[][16]);
int d2_RMS::d2_RootMeanSquare(int n, int vector[][16]){
for (a=0;a<n;a++){
x = 0;
for (b=0;b<n;b++){
x = x + pow(vector[a],2);
}}