It is compelling to answer ‘yes’. Unfortunately, the answer is ‘not always’. To see why, let’s setup an experiment where red and green cards are shown to a test subject. The job of the subject is to observe a sequence of cards and to guess the color of the next cards. Suppose that we use a certain sequence where 75% of the cards are green and 25% are red cards. The subject might choose to use one of the following 2 strategies for guessing:
(i) Probability based guessing: Observe and compute probability of cards being green and red. Then always choose the color with higher probability. In the above example, the subject will always choose green. If we let the subject keeps guessing, the correct probability will approach 75%. But it can never be better than 75%. This is what most non-human animals such as mouses would do.
Saturday, July 17, 2010
Monday, July 12, 2010
C++ and OTcl Linkage: OTcl Commands — Getting Started
Note: The content in this series is extracted from the book, Introduction to Network Simulator NS2. You may have to read chapter 3 of the book for better understanding.
OTcl Command -- Getting Started
View more presentations from Teerawat Issariyakul.
Introduction
This post is the second post in the series on C++ and OTcl Linkage:
1. Why Two Languages?
2. Binding C++ and OTcl classes [Main steps, The mechanism].
3. Variable binding
4. OTcl command: Invoking C++ statements from the OTcl domain [ Getting Started, Make it more Interesting ]
5. Eval and result: Invoking OTcl statements from the C++ domain
6. Object binding and object construction process.
In the previous post, I blogged about how C++ and OTcl classes are bound together. In this post, I will explain how to bind C++ and OTcl class variable together.
=======================================================
T. Issaraiyakul and E. Hossain, “Introduction to Network Simulator NS2”, Springer 2009. Buy it now from
You may also find lecture notes and other resource at the following website: http://www.ece.ubc.ca/~teerawat/NS2.htm
OTcl Command -- Getting Started
View more presentations from Teerawat Issariyakul.
Introduction
This post is the second post in the series on C++ and OTcl Linkage:
1. Why Two Languages?
2. Binding C++ and OTcl classes [Main steps, The mechanism].
3. Variable binding
4. OTcl command: Invoking C++ statements from the OTcl domain [ Getting Started, Make it more Interesting ]
5. Eval and result: Invoking OTcl statements from the C++ domain
6. Object binding and object construction process.
In the previous post, I blogged about how C++ and OTcl classes are bound together. In this post, I will explain how to bind C++ and OTcl class variable together.
=======================================================
T. Issaraiyakul and E. Hossain, “Introduction to Network Simulator NS2”, Springer 2009. Buy it now from
You may also find lecture notes and other resource at the following website: http://www.ece.ubc.ca/~teerawat/NS2.htm
Thursday, July 8, 2010
Segmentation Fault: A Common Error in NS2
Introduction
One of the most common error you might have found when running NS2 is "Segmentation Fault". This is just a type of runtime error. If you run, the same program in Win32 console application, Windows will show a run-time error message and terminate the program. So don't be intimidated by it.
One of the most common error you might have found when running NS2 is "Segmentation Fault". This is just a type of runtime error. If you run, the same program in Win32 console application, Windows will show a run-time error message and terminate the program. So don't be intimidated by it.
Monday, July 5, 2010
C++ and OTcl Linkage: Binding variables
Note: The content in this series is extracted from the book, Introduction to Network Simulator NS2. You may have to read chapter 3 of the book for better understanding.
Introduction
This post is the second post in the series on C++ and OTcl Linkage:
1. Why Two Languages?
2. Binding C++ and OTcl classes [Main steps, The mechanism].
3. Variable binding
4. OTcl command: Invoking C++ statements from the OTcl domain
5. Eval and result: Invoking OTcl statements from the C++ domain
6. Object binding and object construction process.
In the previous post, I blogged about how C++ and OTcl classes are bound together. In this post, I will explain how to bind C++ and OTcl class variable together.
NS2: Binding C++ and OTcl variables
View more presentations from Teerawat Issariyakul.
=======================================================
T. Issaraiyakul and E. Hossain, “Introduction to Network Simulator NS2”, Springer 2009.
You may also find lecture notes and other resource at the following website: http://www.ece.ubc.ca/~teerawat/NS2.htm
Introduction
This post is the second post in the series on C++ and OTcl Linkage:
1. Why Two Languages?
2. Binding C++ and OTcl classes [Main steps, The mechanism].
3. Variable binding
4. OTcl command: Invoking C++ statements from the OTcl domain
5. Eval and result: Invoking OTcl statements from the C++ domain
6. Object binding and object construction process.
In the previous post, I blogged about how C++ and OTcl classes are bound together. In this post, I will explain how to bind C++ and OTcl class variable together.
NS2: Binding C++ and OTcl variables
View more presentations from Teerawat Issariyakul.
=======================================================
T. Issaraiyakul and E. Hossain, “Introduction to Network Simulator NS2”, Springer 2009.
You may also find lecture notes and other resource at the following website: http://www.ece.ubc.ca/~teerawat/NS2.htm
Subscribe to:
Posts (Atom)