Click here to Skip to main content
15,867,834 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
C#
double metric;

  if ((bearer->GetApplication ()->GetApplicationType () == Application::APPLICATION_TYPE_INFINITE_BUFFER)
      ||
      (bearer->GetApplication ()->GetApplicationType () == Application::APPLICATION_TYPE_CBR))
    {
      metric = (spectralEfficiency * 180000.)
                /
                bearer->GetAverageTransmissionRate();
    }
  else
    {

     QoSForEXP *qos = (QoSForEXP*) bearer->GetQoSParameters ();
Posted
Comments
Sergey Alexandrovich Kryukov 6-Sep-15 0:38am    
Help with what? Please, write your own code and ask some question if you face some problems, but not waste to on who knows what.
—SA
Fariba Mohammadi 6-Sep-15 1:11am    
This is a part of an open-source program which is written to simulate a mobile network. It contains of several scheduling algorithms and I`m going to change those lines above, to create my own proposal algorithm. But I don`t no what programming language is it and how to call a procedure from another part of the program in it.
Sergey Alexandrovich Kryukov 6-Sep-15 9:48am    
It looks C++, but it will hardly help you. You are facing a problem you just should not face, in reasonable organization of software development. It's much better to write your algorithm from scratch and use it directly. It looks like you are using unsupported software, which is trap. The more you succeed in patching it (even if you can), the more you get yourself in the trap.
—SA
enhzflep 6-Sep-15 11:49am    
How on earth does someone that tags a question with the correct language, who then goes on to ask what language it is, manage to cheat make it through to the stage where they are asked to submit a thesis?
No seriously, how does one manage such a feat?


I'd be lying if I said I felt sorry for you receiving a beating at StackOverflow.
What programming language is this code written in? [on hold]

EDIT: A member at Code Project and StackOverflow since the 6th of Sept 2015. Oh dear, I see a job at Mash Donald's or Pizza Hot (spelling correct for each of them) coming your way. Either that, or a position with the military using photoshop to create their next piece of laughable propaganda. fearsome military hardware.

1 solution

Um...you have answered your own question in the tag you applied.
This is C++

But if you are collecting random source from the internet without even knowing (or being able to recognise) what language it is written in, then I suspect you are going to have considerable problem understanding the code sufficiently to "create my own proposal algorithm"

Learn the language and become good and proficient in it first - or it will not work well in the long run.
 
Share this answer
 
Comments
Fariba Mohammadi 6-Sep-15 2:25am    
I have not enough time to learn C++ completely. I want to change these codes:

QoSForEXP *qos = (QoSForEXP*) bearer->GetQoSParameters ();

double HOL = bearer->GetHeadOfLinePacketDelay ();
double alfa = -log10(qos->GetDropProbability()) / qos->GetMaxDelay ();
double avgAW = GetAW ();
double AW = alfa * HOL;

if (AW < 0.000001)
AW=0;

double AW_avgAW = AW - avgAW;

if (AW_avgAW < 0.000001)
AW_avgAW=0;

metric = exp ( AW_avgAW /
(1 + sqrt (GetAW ())) )
*
((spectralEfficiency * 180000.)
/
bearer->GetAverageTransmissionRate());
}

to these ones:

QoSForEXP *qos = (QoSForEXP*) bearer->GetQoSParameters ();
double HOL = bearer->GetHeadOfLinePacketDelay ();
double QCI = ???????????????????????????
metric = ( HOL / QCI )
*
((spectralEfficiency * 180000.)
/
bearer->GetAverageTransmissionRate());
}

i should read "QCI" from the "QoSParameters.h" file.
How can I do that?
OriginalGriff 6-Sep-15 2:31am    
If you "have not enough time to learn C++ completely" then you are just guessing - and that isn't a viable development technique.

Would you try to fly a plane without knowing how to land?
Fariba Mohammadi 6-Sep-15 2:43am    
you don`t want to help me, you are just chatting with me, i have serious problem in my thesis, let someone else give me advise to carry out my program.
thank u
OriginalGriff 6-Sep-15 3:05am    
Whoa, whoa, whoa - this is your *thesis*?

That's different: We do not do your homework.
And if you are copying code from the internet to hand in without even understanding it at all, then you deserve the failing grade you are going to receive for plagiarising it in the first place.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900