| Interface | Description |
|---|---|
| ViewInterface |
Part of MVC; all the views need to implement this interface if it needs
to interact with any of the models.
|
| Class | Description |
|---|---|
| Approver |
This is the Approver class which represents a user that has the
capabilities of a Approver.
|
| BuildConfig | |
| Claim |
Class that contains the Claim model.
|
| Claimant |
This is the Claimant class which represents a user that has the
capabilities of a Claimant.
|
| ClaimApplication |
Helps setup the application for when the app is launched.
|
| ClaimController |
The Claim Controller class is used for making changes to a Claim that
is supplied to the controller.
|
| ClaimList |
Class is a list that holds Claims.
|
| ClaimListActivity |
This activity is the first activity that is displayed to the user.
|
| ClaimListAdapter |
The ClaimListAdapter allows essential information from a Claim to
be displayed in a ListView.
|
| ClaimListController |
When making edits to the Claim List model it should be done through
this ClaimListController class.
|
| ClaimListMapper |
ClaimListMapper loads all the claims in the list using ClaimMapper.
|
| ClaimMapper |
The ClaimMapper helps us save all the data related to a claim.
|
| Constants |
Class contains all the values that are constant throughout the
application.
|
| DatePickerFragment |
Creates a DatePicker dialog.
|
| Destination |
Class contains all the information that a Destination needs.
|
| DestinationListAdapter |
Allows essential information from the Destination class to be displayed
in a ListView.
|
| EditClaimActivity |
This activity contains a claim that was selected from the ClaimListActivity
and allows you to edit the claim.
|
| EditExpenseActivity |
Activity takes an expense from the ExpenseListActivity and allows
the user to edit information about the expense.
|
| Expense |
Class that contains the Expense model.
|
| ExpenseController |
When supplied with an expense the controller allows you to edit
expense information (expense should not be edited directly).
|
| ExpenseListActivity |
This activity displays the list of expenses that is related to the
current claim.
|
| ExpenseListAdapter |
An adapter that allows an expense to display its essential information
in a ListView.
|
| NewClaimActivity |
Activity that allows the user to add a new claim to the claim list.
|
| NewExpenseActivity |
This is the activity that provides functionality for adding a new
expense to the current claim.
|
| R | |
| R.array | |
| R.attr | |
| R.dimen | |
| R.drawable | |
| R.id | |
| R.layout | |
| R.menu | |
| R.string | |
| R.style | |
| SModel |
Part of MVC; all models must extend the SModel.
|
| User |
The superclass that all types of users will have to inherit.
|


Brexit has put Scottish independence back on the table – Tony Blair
The former prime minister said that the deal put forward for Northern Ireland had added an ‘extra dimension’ to pro-Scottish independence arguments.
Scottish independence is “back on the table again” because of Brexit, Tony Blair has said.
The former Labour prime minister gave a speech in London on Brexit and the General Election and said Boris Johnson’s deal – where Northern Ireland remains more closely aligned to the European Union than the rest of the EU – added “an additional dimension” to the nationalists’ argument.
Speaking to a Reuters Newsmakers event on Monday morning, Mr Blair said: “I don’t think campaigning for an independent Scotland is extreme. I just don’t agree with it.
“I think the United Kingdom is stronger if we’re all together, I think Scotland is better off inside the UK.
“But, you know, Brexit has put it back on the table again. This part of the other problem, I’m afraid, is that you’ve got a situation with Northern Ireland which is very tricky if the Johnson deal goes forward.
“You’ve got a situation where obviously the Scottish nationalists now have an additional dimension to their argument.
“I still don’t agree with it, but, you know, they’re going to be saying: ‘You’ve allowed Northern Ireland to stay inside the single market, why aren’t we allowed to, we also voted heavily against Brexit?'”


Profile Page
Display Name:
QinlanZhao
Email Address:
<EMAIL_ADDRESS>Phone Number:
346-310-3808
Zipcode:
77030
Password:
Password Confirmation:


Latest News
New release
July 2st, 2017
Release v0.3.1 is out including psf, nc, dcd, gro, trr and xtc support. Read more on
github
Useful Links
NGL Viewer @GitHub
NGLview @GitHub
NGL Gui example
NGL documentation
NGL gallery
Websites using MDsrv/NGL(view)
RCSB PDB
GPCRmd
AMBER
Interesting projects
simpletraj
MDAnalysis
MDTraj
Tweet #MDsrv #NGL


Method to build proper parameter string to OData requests based on the given option Object.
Checks whether a given parameter is standard OData param or not and based on this information this params get the '$' sign.
If there's no select param given, or it is empty 'Id' is the default, so only this field will be on the content in the JSON result. To get all the field values, without selection, set it to 'all', but please avoid this if it's possible.
Represents an ODataOptions object based through the IODataOptions interface. Holds the possible url parameters as properties.
String with the url params in the correct format e.g. '$select=DisplayName,Index'&$top=2&metadata=no'.
Method that gets the URL that refers to a single item in the Sense/Net Content Repository
Path that you want to format.
Path in entity format e.g. /workspaces('project') from /workspaces/project
Method that gets the URL that refers to a single item in the Sense/Net Content Repository by its Id
Id of the Content.
e.g. /content(123)
Method that tells if a path is an item path.
Path that you want to test.
Returns if the given path is a path of a Content or not.
Method that allows to join paths without multiple or missing slashes
The list of the paths to join
Generated using TypeDoc
Helper methods for OData Operations


This project aims to provide a simple set of POJO beans with which you can map JCR (document, binary, etc) nodes to POJO (ContentNode) beans, and also bind the POJO beans back to JCR (document, binary, etc) nodes. The POJO beans provided by this project are very friendly to most marshalling/unmarshalling frameworks such as Jackson (for JSON), JAXB (for XML) or any others (for YAML as an example). Therefore, you can easily export JCR content through the POJO (ContentNode) beans after mapping, and import data through the (unmarshalled) POJO (ContentNode) beans to JCR content by binding.
As depicted in the diagram above, what this project provides is in the light yellow area in the center. The left and right area are out of scope in this project.
Some pointers are:
Basically two main POJO beans are provided by this project: ContentNode and ContentProperty.
ContentNode is analogous to javax.jcr.Node and ContentProperty is analogous to javax.jcr.Property. ContentNode may have multiple ContentProperty items and multiple child ContentNode items like JCR. But they are purely serializable as POJOs. Also, for simplicity, ContentProperty stores all the values in string. It provides type transforming getter methods for convenience though. For example, ContentProperty#getValue(String name) returns a string value, and ContentProperty#getValues(String name) returns a list of string values. However, CotnentProperty#getValueAsObject(String name) returns a transformed object value (e.g, Long, Double, BigDecimal, Calendar, BinaryValue, etc) from the internal string value, and CotnentProperty#getValuesAsObject(String name) returns a list of transformed object values for convenience.
Please see more detail in JavaDocs.
It is very crucial to handle binary data properly even in a simple mapping/binding library because the data size of a binary value can be big which may make a bad impact on system availability (e.g, OutOfMemoryError).
So, this library handles binary data values carefully with using BinaryValue unlike other values (other values are always stringified internally for simplicity).
For example, DefaultJcrContentValueConverter (the default ContentValueConverter implementation) is able to automatically serialize a binary data into an external VFS file and keep the URL string only in the ContentProperty instance if the data size exceeds the configured threshold size. If the data size is less than the configured threshold size, it simply converts the binary data into a data: URL (containing a mimeType optionally as well as BASE64 encoded string).
Please see Release Notes.


Using multiple skyboxes on a map
This tutorial will touch the issue on how Q3Map2 handles multiple skyboxes in a single map. If you've ever created a map where you have multiple skyboxes, you have probably faced the issue we are going to fix here: Q3Map2 doesn't know how to use mutliple skyboxes properly, making your lightmaps overly exposured and dull looking.
Illustrating the issue
I created this simple map to illustrate the issue. Here we see a properly lit map, with Oasis sky.
As you can see, the shadows look nice and crisp, and there is actually difference with light and dark. Now what happens when we have 4 identical rooms, each with different skies? I copied the room 3 times, changed the sky textures so that the map has a room with Oasis, Fueldump, Goldrush and Radar skies. Here is the same room.
As you can see, the lighting has changed a lot: Shadows are dull, and the map in general looks too bright. Also, here are the other rooms. Notice how the lighting is exactly same in every room, despite the different skies.
So what happened here?
Q3Map2 cannot apply different skylight conditions in different areas in the map, even when the rooms are sealed with structural brushes and every outer surface is caulk. What it does instead is add up all skyshader directives that produce light into the map, and combines them to light the whole map. You could probably modify Q3Map2 to properly support multiple skyboxes as the source code is available on GitHub, but that's something a bit more advanced, and we are not going to do it. Instead we are going to work around this issue by modifying the sky shaders used in our map.
Fixing the shaders
First, let's take a look at the 4 sky shader we used in our map (found in fueldump.shader, skies.shader and skies_sd.shader).
//Fueldump Sky
textures/fueldump/fueldumpsky
{
qer_editorimage textures/skies/fueldump_clouds.tga
q3map_lightrgb 0.8 0.9 1.0
q3map_skylight 85 3
q3map_sun 1 .95 .9 200 210 28
skyparms - 200 -
surfaceparm nodlight
surfaceparm noimpact
surfaceparm nolightmap
surfaceparm sky
{
map textures/skies/fueldump_clouds.tga
rgbGen identity
}
{
map textures/skies/fueldump_clouds.tga
blendfunc blend
rgbGen identity
tcMod scroll 0.0005 0.00
tcMod scale 2 1
}
}
//Goldrush Sky
textures/skies/sd_goldrush
{
qer_editorimage textures/skies/sky_8.tga
q3map_skylight 65 3
q3map_sun 0.3 0.3 0.45 60 35 45
nocompress
skyparms - 200 -
sunshader textures/skies_sd/full_moon2
surfaceparm noimpact
surfaceparm nolightmap
surfaceparm sky
skyparms textures/skies_sd/wurzburg_env/sky 512 -
{ fog off
map textures/skies_sd/goldrush_clouds.tga
tcMod scale 5 5
tcMod scroll 0.0015 -0.003
rgbGen identityLighting
}
{ fog off
map textures/skies/nightsky1.jpg
tcMod scale 10 10
blendfunc add
rgbGen identityLighting
}
{
fog off
clampmap textures/skies_sd/goldrush_mask.tga
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
tcMod scale 0.956 0.956
tcMod transform 1 0 0 1 -1 -1
// rgbGen identityLighting
//rgbGen const ( 0.6 0.6 0.6 )
rgbGen const ( 0.4 0.4 0.4 )
}
}
//Radar Sky
textures/skies/sd_wurzburgsky
{
nocompress
qer_editorimage textures/skies/sky_8.tga
q3map_lightimage textures/skies/n_blue2.tga
q3map_nofog
q3map_globaltexture
q3map_lightsubdivide 256
q3map_sun 0.130 0.080 0.020 20 165 5
q3map_sun 0.281 0.288 0.370 80 35 40
q3map_sun 0.281 0.288 0.370 15 215 60
q3map_sun 0.281 0.288 0.370 10 35 50
q3map_sun 0.281 0.288 0.370 10 35 45
q3map_sun 0.281 0.288 0.370 10 35 35
q3map_sun 0.281 0.288 0.370 10 35 30
q3map_sun 0.281 0.288 0.370 10 40 40
q3map_sun 0.281 0.288 0.370 10 45 40
q3map_sun 0.281 0.288 0.370 10 30 40
q3map_sun 0.281 0.288 0.370 10 25 40
q3map_surfacelight 30
surfaceparm noimpact
surfaceparm nolightmap
surfaceparm sky
skyparms - 512 -
sunshader textures/skies_sd/small_moon
{
map textures/skies_sd/wurzburg_clouds.tga
tcMod scale 2.5 2.5
tcMod scroll 0.003 -0.0015
rgbGen identityLighting
}
{
map textures/skies_sd/ydnar_lightning.tga
blendFunc GL_SRC_ALPHA GL_ONE
rgbGen wave triangle -8 9 0 0.137
alphaGen wave noise -3 4 0 2.37
tcMod scale 3 3
tcMod scroll 0.003 -0.0015
}
{
clampmap textures/skies_sd/wurzburg_fogmask.tga
blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
tcMod scale 0.956 0.956
tcMod transform 1 0 0 1 -1 -1
rgbGen identitylighting
}
}
//Oasis Sky
textures/skies_sd/sd_siwasky
{
nocompress
qer_editorimage textures/skies_sd/nero_bluelight.tga
q3map_lightimage textures/skies_sd/siwa_clouds.tga
q3map_sun 0.75 0.70 0.6 135 199 49
q3map_skylight 75 3
sunshader textures/skies_sd/siwasunbright
surfaceparm noimpact
surfaceparm nolightmap
surfaceparm nodlight
surfaceparm sky
skyparms textures/skies_sd/wurzburg_env/sky 512 -
{
fog off
clampmap textures/skies_sd/siwa_mask.tga
tcMod scale 0.956 0.956
tcMod transform 1 0 0 1 -1 -1
rgbGen identityLighting
}
}
If you are unfamiliar with shaders, you might want to take a moment to look at the Q3Map2 Shader Manual before proceeding.
To fix our issues with lighting, we need to modify the shaders so that there is only one sky in our map that produces light, while the rest are just pretty looking textures. To do this, we need to figure out exactly which directives in the shaders produce light. The shader manual helps us out here. These directives in sky shaders affect the lighting in our map (not all of them are used in these shaders obviously):
q3map_lightimage
q3map_lightmapFilterRadius
q3map_lightRGB
q3map_lightSubdivide
q3map_noFast
q3map_skylight
q3map_sun
q3map_sunExt
q3map_surfacelight
In general we don't need to worry that much about most of these, as they just modify the lighting instead of
producing it. The most commonly seen directives that actually produce light are q3map_skylight
, q3map_sun
,
q3map_sunExt
and q3map_surfacelight
in conjunction with q3map_lightSubdivide
. To understand what these do, read
the descriptions of them in the shader manual.
Now that we know which directives we need to modify, it's time to start editing the shaders. First, we create a shader file that includes the skies used in our map. Next, we change the paths of the shaders so that we don't mess up the original sky shaders in the game. So for example, I renamed the shaders as following:
textures/skytut/fueldump
textures/skytut/goldrush
textures/skytut/radar
textures/skytut/oasis
Now we need to comment out every light producing directive in every shader except for one, which is going to be the only shader that produces light in the map. Another option is to change the intensity values of the light-producing shaders to 0. I chose Fueldump sky shader to produce light into the map, and commented out every light producing directive in the rest of the shaders. Now, in the map with 4 identical rooms each with different sky shader, here is the room with Oasis sky.
And a picture showing the lighting in every room.
Now the rooms are all lit by the Fueldump sky, and we have proper difference between shadow and light again. The lighting is exactly same in every room, but they are not overly bright. As mentioned earlier, it is not possible to have different sky lighting conditions in different parts of the map, but with this method it's possible to use multiple skyboxes while still maintaining crisp shadows and keeping the brightness level of the map natural.
Design notes
- You might want to further modify the light producing directives to find lighting conditions that look good on every sky. I recommend reading the article about light emitting shaders in the shader manual.
- Sunshaders should be commented out as well, since they are global for the whole map so they appear even on skies that have no sunshader directive.
- Light produced by
q3map_sun
andq3map_sunExt
falls off with angle, but not distance. - In general, it's recommended to use a combination of
q3map_sunExt
,q3map_lightmapFilterRadius
andq3map_skylight
to produce light on sky shader. Refer to the light emitting shaders article on shader manual mentioned earlier.
Tutorial by Aciz


--- layout: research ---
The objective of this project is to develop a system and algorithms for internetworking / peering between different Grids. Grid computing enables the creation of Cyberinfrastructure for e-Research applications. Several nations around the world including Australia have developed their own national Grids based on the notion of virtual organizations. These dispersed Grid initiatives have resulted in islands of Grids without any support for peering arrangements between them. This limitation will impede realization of full potential of the Grid computing paradigm. This InterGrid project aims to revolutionize Grid computing by investigating and developing:
Further information here.
This thesis aims at facilitating the deployment of distributed applications on large-scale Grids, using a peer-to-peer (P2P) infrastructure for computational Grids. Furthermore, this thesis also propose a framework for solving optimization problem with branch-and-bound (B&B) technique.
Existing models and infrastructures for P2P computing are rather disappointing: only independent worker tasks with in general no communications between tasks, and very low level API. This thesis proposes to define a P2P infrastructure of computational nodes and to provide large-scale Grids. The infrastructure is an unstructured P2P network self-organized and configurable, also allowing deployment of communicant applications.
P2P environment seems well adapted to applications with low communication/computation ratio, such as parallel search algorithms and more particularly B&B algorithm. In addition, this thesis defines a parallel B&B framework for Grids. This framework helps programmers to distribute their problems over Grids by hiding all distribution issues. The framework is built over a hierarchical master-worker approach and provides a transparent communication system among tasks to improve the computation speedup.
First, we realized an implementation of this P2P infrastructure on top of the ProActive Java Grid middleware, therefore benefiting from underlying features of ProActive. The P2P infrastructure was deployed as a permanent desktop Grid, with which we have achieved a computation world record by solving the n-queens problem for 25 queens. Second, we achieved an implementation of this B&B framework, also on top of ProActive. We demonstrate the scalability and efficiency of the framework by deploying an application for solving the flow-shop problem on a nationwide Grid (Grid'5000). Finally, we mixed this Grid with our permanent desktop Grid to experiment large-scale deployment of both n-queens and flow-shop.
Check the publications section for all publicated work..
All this work was in integrated in ProActive Grid Middleware:
ProActive is a Java library (Source code under LGPL licence) for parallel, distributed, and concurrent computing, also featuring mobility and security in a uniform framework. With a reduced set of simple primitives, ProActive provides a comprehensive API allowing to simplify the programming of applications that are distributed on Local Area Network (LAN), on cluster of workstations, or on Internet Grids.Summer 2004 I had an internship in Indiana University Extreme Lab where I had an occasion to work with a great group of people under guidance of Pr. Dennis Gannon.
I have worked with Aleksander Slominski to support reliable long running conversation through firewalls of Web Service peers that have no accessible endpoints (behind firewalls, inside browers). Our solution was to use a Dispatcher with asynchronous communication and use WS-Addressing (WSA) for forwarding requests between clients and Web Services. For more informations you can see this page WS-Dispatcher or read this paper: Asynchronous Peer to Peer Web Services and Firewalls accepted at IWJDPC 2005.
This work is integrated in XSUL. XSUL is third generation XML and Web Services based modular Utility Library and is derived from a previous work on XSOAP that in its turn was derived from SoapRMI.


public interface RMILogger extends Remote
Logger
instance
will remain on the machine that created it and its references can be sent to
other connected machines. If the original logger is not reachable a log
operation does not throw RemoteException
and the logging operation
will have no effects.| Modifier and Type | Method and Description |
|---|---|
static RMILogger |
get(java.lang.Class<?> cls)
Creates a
Logger using the name of the specified class |
static RMILogger |
get(java.lang.Class<?> cls,
java.io.PrintStream printStream)
Creates a
Logger using the name of the specified class and the given
PrintStream on which the logger must print. |
static RMILogger |
get(java.lang.String name)
Creates a
Logger using the specified name |
static RMILogger |
get(java.lang.String name,
java.io.PrintStream printStream)
Creates a
Logger using the specified name and the given
PrintStream on which the logger must print. |
void |
log(java.lang.String format,
java.lang.Object... objects)
Logs a string using the specified format and composed by the specified
objects.
|
void |
logIf(boolean condition,
java.lang.String format,
java.lang.Object... objects)
As
log(String, Object...) logs a string. |
static RMILogger get(java.lang.String name, java.io.PrintStream printStream)
Logger
using the specified name and the given
PrintStream
on which the logger must print.name
- the name of this logger that will be printed aside each
log stringprintStream
- the PrintStream
to log toRMILogger
static RMILogger get(java.lang.Class<?> cls, java.io.PrintStream printStream)
Logger
using the name of the specified class and the given
PrintStream
on which the logger must print.cls
- the class whose name is used as logger name that will be
printed aside each log stringprintStream
- the PrintStream
to log toRMILogger
static RMILogger get(java.lang.String name)
Logger
using the specified namename
- the name of this logger that will be printed aside each log
stringRMILogger
static RMILogger get(java.lang.Class<?> cls)
Logger
using the name of the specified classcls
- the class whose name is used as logger name that will be printed
aside each log stringRMILogger
void log(java.lang.String format, java.lang.Object... objects)
format
- the format of the log stringobjects
- the objects that are printed in the formatted stringvoid logIf(boolean condition, java.lang.String format, java.lang.Object... objects)
log(String, Object...)
logs a string. The string is logged if and
only if the specified condition is true.condition
- set to true to log the string or set to false to have no
effectsformat
- the format of the log stringobjects
- the objects that are printed in the formatted string


| 002:076 Khan | : |
And when they (Jews) meet those who believe (Muslims), they say, "We believe", but when they meet one another in private, they say, "Shall you (Jews) tell them (Muslims) what Allah has revealed to you [Jews, about the description and the qualities of Prophet Muhammad Peace be upon him, that which are written in the Taurat (Torah)], that they (Muslims) may argue with you (Jews) about it before your Lord?" Have you (Jews) then no understanding? |
| 002:076 Maulana | : |
And when they meet those who believe they say, We believe, and when they- are apart one with another they say: Do you talk to them of what Allah has disclosed to you that they may contend with you by this before your Lord? Do you not understand? |
| 002:076 Pickthal | : |
And when they fall in with those who believe, they say: We believe. But when they go apart one with another they say: Prate ye to them of that which Allah hath disclosed to you that they may contend with you before your Lord concerning it? Have ye then no sense? |
| 002:076 Rashad | : |
And when they meet the believers, they say, "We believe," but when they get together with each other, they say, "Do not inform (the believers) of the information given to you by GOD, lest you provide them with support for their argument concerning your Lord. Do you not understand?" |
| 002:076 Sarwar | : |
On meeting the believers, they would declare belief but to each other they would say, "How would you (against your own interests) tell them (believers) about what God has revealed to you (in the Bible of the truthfulness of the Prophet Muhammad)? They will present it as evidence to prove you wrong before your Lord. Do you not realize it?" |
| 002:076 Shakir | : |
And when they meet those who believe they say: We believe, and when they are alone one with another they say: Do you talk to them of what Allah has disclosed to you that they may contend with you by this before your Lord? Do you not then understand? |
| 002:076 Sherali | : |
And when they meet those who believe, they say 'We believe,' and when they meet one another in private, they say, 'Do you inform them (the believers) of what ALLAH has unfolded to you, that they may thereby argue with you before your Lord. Will you not then understand? |
| 002:076 Yusufali | : |
Behold! when they meet the men of Faith, they say: "We believe": But when they meet each other in private, they say: "Shall you tell them what Allah hath revealed to you, that they may engage you in argument about it before your Lord?"- Do ye not understand (their aim)? |
Concepts/Themes Covered: الإيمان > الإيمان بالله > النفاق Faith> Belief In Allah> Hypocrisy الديانات > بنو إسرائيل > معاندتهم و تكذيبهم و قتلهم الأنبياء Religions>Children of Israel> Their Opposition, their Denial and their Killing the Prophets
This tool uses eight English parallel translations for the Holy Quran imported from Mr. Clay Smith. You can also visit Qurany Concepts for browsing the Quran themes or topics. If you want to search the Holy Quran for keywords, please visit Qurany Keywords.


Flash and JavaScript are required for this feature.
Download the video from iTunes U or the Internet Archive.
Description: Can multiple weak classifiers be used to make a strong one? We examine the boosting algorithm, which adjusts the weight of each classifier, and work through the math. We end with how boosting doesn't seem to overfit, and mention some applications.
Instructor: Patrick H. Winston
Lecture 17: Learning: Boosting
Related Resources
Specifically developed for this lecture are the boosting notes (PDF), which are also listed among the readings for this course.
PATRICK WINSTON: We've now almost completed our journey.
This will be it for talking about several kinds of learning-- the venerable kind, that's the nearest neighbors and identification tree types of learning.
Still useful, still the right thing to do if there's no reason not to do the simple thing.
Then we have the biologically-inspired approaches.
Neural nets.
All kinds of problems with local maxima and overfitting and oscillation, if you get the rate constant too big.
Genetic algorithms.
Like neural nets, both are very naive in their attempt to mimic nature.
So maybe they work on a class of problems.
They surely do each have a class of problems for which they're good.
But as a general purpose first resort, I don't recommend it.
But now the theorists have come out and done some things are very remarkable.

I wonder if nature has discovered them, too?
Is there good engineering in the brain, based on good science?
Or given the nature of evolution, is it just random junk that is the best ways for doing anything?
Who knows?
But today, we're going to talk about an idea that I'll bet is in there somewhere, because it's easy to implement, and it's extremely powerful in what it does, and it's the essential item in anybody's repertoire of learning mechanisms.
It's also a mechanism which, if you understand only by formula, you will never be able to work the problems on the quiz, that's for sure.
Because on the surface, it looks like it'd be very complicated to simulate this approach.
But once you understand how it works and look at a little bit of the math and let it sing songs to you, it turns out to be extremely easy.
So it's about letting multiple methods work in your behalf.
So far, we've been talking about using just one method to do something.
And what we're going to do now is we're looking to see if a crowd can be smarter than the individuals in the crowd.
But before we get too far down that abstract path, let me just say that the whole works has to do with classification, and binary classification.

Is that a cup of coffee or tea?
Those are binary classification problems.
And so we're going to be talking today strictly about binary classification.
We're not going to be talking about finding the right letter in the alphabet that's written on the page.
That's a 26-way choice.
We're talking about binary choices.
So we assume that there's a set of classifiers that we can draw on.
Here's one-- h.
And it produces either a minus 1 or a plus 1.
So that's how the classification is done.
If it's coffee, plus 1.
If it's tea, minus 1.
Is this chalk, plus one.
If it's a hand grenade, minus 1.
So that's how the classification works.
Now, too bad for us, normally the world doesn't give us very good classifiers.
So if we look at the error rate of this classifier or any other classifier, that error rate will range from 0 to 1 in terms of the fraction of the cases got wrong on a sample set.
So you'd like your error rate to be way down here.
You're dead if it's over there.
But what about in the middle?
What if it's, say, right there.
Just a little bit better than flipping a coin.
If it's just a little bit better than flipping a coin, that's a weak classifier.
And the question is, can you make a classifier that's way over here, like there, a strong classifier, by combining several of these weak classifiers, and letting them vote?
So how would you do that?
You might say, well, let us make a big classifier capital H, that works on some sample x, and has its output produces something that depends on the sum of the outputs of the individual classifiers.
So we have H1 working on x.
We have H2 working on x.
And we have H3 also working on x.
Let's say three of them, just to start us off.
And now let's add those guys up, and take the sign of the output.
So if two out of the three of those guys agree, then we'll get an either plus 1 or minus 1.
If all three agree, we'll get plus 1 or minus 1.
Because we're just taking the sign.
We're just taking the sign of the sum of these guys.
So this means that one guy can be wrong, as long as the other two guys are right.
But I think it's easier to see how this all works if you think of some space of samples, you say, well, let's let that area here be where H1 is wrong, and this area over here is where H2 is wrong.
And then this area over here is where H3 is wrong.
So if the situation is like that, then this formula always gives you the right answers on the samples.
I'm going to stop saying that right now, because I want to be kind of a background thing on the samples set.
We're talking about wrapping this stuff over the sample set.
Later on, we'll ask, OK, given that you trained this thing on a sample set, how well does it do on some new examples?
Because we want to ask ourselves about overfitting questions.
But for now, we just want to look and see if we believe that this arrangement, where each of these H's is producing plus 1 or minus 1, we're adding them up and taking the sign, is that going to give us a better result than the tests individually?
And if they look like this when draped over a sample set, then it's clear that we're going to get the right answer every time, because there's no area here where any two of those tests are giving us the wrong answer.
So the two that are getting the right answer, in this little circle here for H1, these other two are getting the right answer.
So they'll outvote it, and you'll get the right answer every time.
But it doesn't have to be that simple.
It could look like this.
There could be a situation where this is H1, wrong answer.
This is H2, wrong answer.
And this is H3, wrong answer.
And now the situation gets a little bit more murky, because we have to ask ourselves whether that area where three out of the three get it wrong is sufficiently big so as to be worse than 1 of the individual tests.
So if you look at that Venn diagram, and stare at it long enough, and try some things, you can say, well, there is no case where this will give a worse answer.
Or, you might end up with the conclusion that there are cases where we can arrange those circles such that the voting scheme will give an answer that's worst than an individual test, but I'm not going to tell you the answer, because I think we'll make that a quiz question.
Good idea?
OK.
So we'll make that a quiz question.
So that looks like a good idea.
And we can construct a little algorithm that will help us pick the particular weak classifiers to plug in here.
We've got a whole bag of classifiers.
We've got H1, we've got H2, we've got H55.
We've got a lot of them we can choose from.
So what we're going to do is we're going to use the data, undisturbed, to produce H1.
We're just going to try all the tests on the data and see which one gives us the smallest error rate.
And that's the good guy, so we're going to use that.
Then we're going to use the data with an exaggeration of H1 errors.
In other words-- this is a critical idea.
What we're going to do is we're going to run this algorithm again, but instead of just looking at the number of samples that are got wrong, what we're going to do is we're going to look at a distorted set of samples, where the ones we're not doing well on has exaggerated effect on the result.
So we're going to weight them or multiply them, or do something so that we're going to pay more attention to the samples on which H1 produces an error, and that's going to give us H2.
And then we're going to do it one more time, because we've got three things to go with here in this particular little exploratory scheme.
And this time, we're going to have an exaggeration of those samples-- which samples are we going to exaggerate now?
We might as well look for the ones where H1 gives us a different answer from H2, because we want to be on the good guy's side.
So we can say we're going to exaggerate those samples four which H1 gives us a different result from H2.
And that's going to give us H3.
All right.
So we can think of this whole works here as part one of a multi-part idea.
So let's see.
I don't know, what might be step two?
Well, this is a good idea.
Then what we've got that we can easily derive from that is a little tree looked like this.
And we can say that H of x depends on H1, H2, and H3.
But now, if that that's a good idea, and that gives a better answer than any of the individual tests, maybe we can make this idea a little bit recursive, and say, well, maybe H1 is actually not an atomic test.
But maybe it's the vote of three other tests.
So you can make a tree structure that looks like this.
So this is H11, H12, H13, and then 3 here.
And then this will be H31, H32, H33.
And so that's a sort of get out the vote idea.
We're trying to get a whole bunch of individual tests into the act.
So I guess the reason this wasn't discovered until about '10 years ago was because you've got to get so many of these desks all lined up before the idea gets through that long filter of ideas.
So that's the only idea number two of quite a few.
Well, next thing we might think is, well, we keep talking about these classifiers.
What kind of classifiers are we talking about?
I've got-- oh, shoot, I've spent my last nickel.
I don't have a coin to flip.
But that's one classifier, right?
The trouble with that classifier is it's a weak classifier, because it gives me a 50/50 chance of being right.
I guess there are conditions in which a coin flip is better than a-- it is a weak classifier.
If the two outcomes are not equally probable, than a coin flip is a perfectly good weak classifier.
But what we're going to do is we're going to think in terms of a different set of classifiers.
And we're going to call them decision tree.
Now, you remember decision trees, right?
But we're not going to build decision trees.
We're going to use decision tree stumps.
So if we have a two-dimensional space that looks like this, then a decision tree stump is a single test.
It's not a complete tree that will divide up the samples into homogeneous groups.
It's just what you can do with one test.
So each possible test is a classifier.
How many tests do we get out of that?
12, right?
Yeah.
It doesn't look like 12 to me, either.
But here's how you get to 12.
One decision tree test you can stick in there would be that test right there.
And that would be a complete decision tree stump.
But, of course, you can also put in this one.
That would be another decision tree stump.
Now, for this one on the right, I could say, everything on the right is a minus.
Or, I could say, everything on the right is a plus.
It would happen to be wrong, but it's a valid test with a valid outcome.
So that's how we double the number of test that we have lines for.
And you know what?
can even have a kind of test out here that says everything is plus, or everything is wrong.
So for each dimension, the number of decision tree stumps is the number of lines I can put in times 2.
And then I've got two dimensions here, that's how I got to twelve.
So there are three lines.
I can have the pluses on either the left or the right side.
So that's six.
And then I've got two dimensions, so that gives me 12.
So that's the decision tree stump idea.
And here are the other decision tree boundaries, obviously just like that.
So that's one way can generate a batch of tests to try out with this idea of using a lot of tests to help you get the job done.
STUDENT: Couldn't you also have a decision tree on the right side?
PATRICK WINSTON: The question is, can you also have a test on the right side?
See, this is just a stand-in for saying, everything's plus or everything's minus.
So it doesn't matter where you put the line.
It can be on the right side, or the left side, or the bottom, or the top.
Or you don't have to put the line anywhere.
It's just an extra test, an additional to the ones you put between the samples.
So this whole idea of boosting, the main idea of the day.
Does it depend on using decision tree stumps?
The answer is no.
Do not be confused.
You can use boosting with any kind of classifier.
so why do I use decision tree stumps today?
Because it makes my life easy.
We can look at it, we can see what it's doing.
But we could put bunch of neural nets in there.
We could put a bunch of real decision trees in there.
We could put a bunch of nearest neighbor things in there.
The boosting idea doesn't care.
I just used these decision tree stumps because I and everybody else use them for illustration.
All right.
We're making progress.
Now, what's the error rate for any these tests and lines we drew?
Well, I guess it'll be the error rate is equal to the sum of 1 over n-- That's the total number of points, the number of samples-- summed over the cases where we are wrong.
So gee, we're going to work on combining some of these ideas.
And we've got this notion of exaggeration.
At some stage in what we're doing here, we're going to want to be able to exaggerate the effect of some errors relative to other errors.
So one thing we can do is we can assume, or we can stipulate, or we can assert that each of these samples has a weight associated with it.
That's W1, this is W2, and that's W3.
And in the beginning, there's no reason to suppose that any one of these is more or less important than any of the other.
So in the beginning, W sub i at time [? stub ?] one is equal to 1 over n.
So the error is just adding up the number of samples that were got wrong.
And that'll be the fraction of samples to that you didn't get right.
And that will be the error rate.
So what we want to do is we want to say, instead of using this as the error rate for all time, what we want to do is we want to move that over, and say that the error rate is equal to the sum over the things you got wrong in the current step, times the weights of those that were got wrong.
So in step one, everything's got the same weight, it doesn't matter.
But if we find a way to change their weights going downstream-- so as to, for example, highly exaggerate that third sample, then W3 will go up relative to W1 and W2.
The one thing we want to be sure of is there is no matter how we adjust the weights, that the sum of the weights over the whole space is equal to 1.
So in other words, we want to choose the weights so that they emphasize some of the samples, but we also want to put a constraint on the weights such that all of them added together is summing to one.
And we'll say that that enforces a distribution.
A distribution is a set of weights that sum to one.
Well, that's just a nice idea.
So we're make a little progress.
We've got this idea that we can add some plus/minus 1 classifiers together, you get a better classifier.
We got some idea about how to do that.
It occurs to us that maybe we want to get a lot of classifiers into the act somehow or another.
And maybe we want to think about using decision tree stumps so as to ground out thinking about all this stuff.
So the next step is to say, well, how actually should we combine this stuff?
And you will find, in the literature libraries, full of papers that do stuff like that.
And that was state of the art for quite a few years.
But then people began to say, well, maybe we can build up this classifier, H of x, in multiple steps and get a lot of classifiers into the act.
So maybe we can say that the classifier is the sign of H-- that's the one we picked first.
That's the classifier we picked first.
That's looking at samples.
And then we've got H2.
And then we've got H3.
And then we've got how many other classifiers we might want, or how many classifiers we might need in order to correctly classify everything in our sample set.
So people began to think about whether there might be an algorithm that would develop a classifier that way, one step at a time.
That's why I put that step number in the exponent, because we're picking this one at first, then we're expanding it to have two, and then we're expanding it to have three, and so on.
And each of those individual classifiers are separately looking at the sample.
But of course, it would be natural to suppose that just adding things up wouldn't be enough.
And it's not.
So it isn't too hard to invent the next idea, which is to modify this thing just a little bit by doing what?
It looks almost like a scoring polynomial, doesn't it?
So what would we do to tart this up a little bit?
STUDENT: [INAUDIBLE].
PATRICK WINSTON: Come again?
Do what?
STUDENT: [INAUDIBLE].

STUDENT: Add-- PATRICK WINSTON: Add weights!
STUDENT: --weights.
Yeah.
PATRICK WINSTON: Excellent.
Good idea.
So what we're going to do is we're going to have alphas associated with each of these classifiers, and we're going to determine if somebody can build that kind formula to do the job.
So maybe I ought to modify this gold star idea before I get too far downstream.
And we're not going to treat everybody in a crowd equally.
We're going to wait some of the opinions more than others.
And by the way, they're all going to make errors in different parts of the space.
So maybe it's not the wisdom of even a weighted crowd, but a crowd of experts.
Each of which is good at different parts of the space.
So anyhow, we've got this formula, and there are a few things that one can say turn out.
But first, let's write down the an algorithm for what this ought to look like.
Before I run out of space, I think I'll exploit the right hand board here, and put the overall algorithm right here.
So we're going to start out by letting of all the weights at time 1 be equal to 1 over n.
That's just saying that they're all equal in the beginning, and they're equal to 1 over n.
And n is the number of samples.
And then, when I've got that, I want to compute alpha, somehow.
Let's see.
No, I don't want to do that.
I want to I want to pick a classifier the minimizes the error rate.
And then m, i, zes, error at time t.
And that's going to be at time t.
And we're going to come back in here.
That's why we put a step index in there.
So once we've picked a classifier that produces an error rate, then we can use the error rate to determine the alpha.
So I want the alpha over here.
That'll be sort of a byproduct of picking that test.
And with all that stuff in hand, maybe that will be enough to calculate Wt plus 1.
So we're going to use that classifier that we just picked to get some revised weights, and then we're going to go around that loop until this classifier produces a perfect set of conclusions on all the sample data.
So that's going to be our overall strategy.
Maybe we've got, if we're going to number these things, that's the fourth big idea.
And this arrangement here is the fifth big idea.
Then we've got the sixth big idea.
And the sixth big idea says this.
Suppose that the weight on it ith sample at time t plus 1 is equal to the weight at time t on that same sample, divided by some normalizing factor, times e to the minus alpha at time t, times h at time t, times some function y which is a function of x, But not a function of time.
Now you say, where did this come from?
And the answer is, it did not spring from the heart of mathematician in the first 10 minutes that he looked at this problem.
In fact, when I asked [INAUDIBLE] how this worked, he said, well, he was thinking about this on the couch every Saturday for about a year, and his wife was getting pretty sore, but he finally found it and saved their marriage.
So where does stuff like this come from?
Really, it comes from knowing a lot of mathematics, and seeing a lot of situations, and knowing that something like this might be mathematically convenient.
Something like this might be mathematically convenient.
But we've got to back up a little and let it sing to us.
What's y?
We saw y last time.
The support vector machines.
That's just a function.
That's plus 1 or minus 1, depending on whether the output ought to be plus 1 or minus 1.
So if this guy is giving the correct answer, and the correct answer is plus, and then this guy will be plus 1 too, because it always gives you the correct answer.
So in that case, where this guy is giving the right answer, these will have the same sign, so that will be a plus 1 combination.
On the other hand, if that guy's giving the wrong answer, you're going to get a minus 1 out of that combination.
So it's true even if the right answer should be minus, right?
So if the right answer should be minus, and this is plus, then this will be minus 1, and the whole combination well give you minus 1 again.
In other words, the y just flips the sign if you've got the wrong answer, no matter whether the wrong answer is plus 1 or minus 1.
These alphas-- shoot, those are the same alphas that are in this formula up here, somehow.
And then that z, what's that for?
Well, if you just look at the previous weights, and its exponential function to produce these W's for the next generation, that's not going to be a distribution, because they won't sum up to 1.
So what this thing here, this z is, that's a sort of normalizer.
And that makes that whole combination of new weights add up to 1.
So it's whatever you got by adding up all those guys, and then dividing by that number.
Well, phew.
I don't know.
Now there's some it-turns-out-thats.
We're going to imagine that somebody's done the same sort of thing we did to the support vector machines.
We're going to find a way to minimize the error.
And the error we're going to minimize is the error produced by that whole thing up there in 4.
We're going to minimize the error of that entire expression as we go along.
And what we discover when we do the appropriate differentiations and stuff-- you know, that's what we do in calculus-- what we discover is that you get minimum error for the whole thing if alpha is equal to 1 minus the error rate at time t, divided by the error rate at time t.
Now let's take the logarithm of that, and multiply it by half.
And that's what [INAUDIBLE] was struggling to find.
But we haven't quite got it right.
And so let me add this in separate chunks, so we don't get confused about this.
It's a bound on that expression up there.
It's a bound on the error rate produced by that expression.
So interestingly enough, this means that the error rate can actually go up as you add terms to this formula.
all you know is that the error rate is going to be bounded by an exponentially decaying function.
So it's eventually guaranteed to converge on zero.
So it's a minimal error bound.
It turns out to be exponential.
Well, there it is.
We're done.
Would you like to see a demonstration?
Yeah, OK.
Because you look at that, and you say, well, how could anything like that possibly work?
And the answer is, surprisingly enough, here's what happens.
There's a simple little example.
So that's the first test chosen.
the greens are pluses and the reds are minuses, so it's still got an error.
Still got an error-- boom.
There, in two steps.
It now has-- we can look in the upper right hand corner-- we see its used three classifiers, and we see that one of those classifiers says that everybody belongs to a particular class, three different weights.
And the error rate has converged to 0.
So let's look at a couple of other ones.
Here is the one I use for debugging this thing.
We'll let that run.
See how fast it is?
Boom.
It converges to getting all the samples right very fast.
Here's another one.
This is one we gave on an exam a few years back.
First test.
Oh, I let it run, so it got everything instantaneously right.
Let's take that through step at a time.
There's the first one, second one.
Still got a lot of errors.
Ah, the error rate's dropping.
And then flattened, flattened, and it goes to 0.
Cool, don't you think?
But you say to me, bah, who cares about that stuff?
Let's try something more interesting.
There's one.
That was pretty fast, too.
Well, there's not too many samples here.
So we can try this.
So there's an array of pluses and minuses.
Boom.
You can see how that error rate is bounded by an exponential?
So in a bottom graph, you've got the number of classifiers involved, and that goes up to a total, eventually, of 10.
You can see how positive or negative each of the classifiers that's added is by looking at this particular tab.
And this just shows how they evolve over time.
But the progress thing here is the most interesting.
And now you say to me, well, how did the machine do that?
And it's all right here.
We use an alpha that looks like this.
And that allows us to compute the new weights.
It says we've got a preliminary calculation.
We've got to find a z that does the normalization.
And we sure better bring our calculator, because we've got, first of all, to calculate the error rate.
Then we've got to take its logarithm, divide by 2, plug it into that formula, take the exponent, and that gives us the new weight.
And that's how the program works.

Now, I don't care about my computer.
I really don't.
It's a slave, and it can calculate these logarithm and exponentials till it turns blue, and I don't care.
Because I've got four cores or something, and who cares.
Might as well do this, than sit around just burning up heat.
But you don't want to do that.
So what you want to do is you want to know how to do this sort of thing more expeditiously.
So we're going to have to let them the math sing to us a little bit, with a view towards finding better ways of doing this sort of thing.
So let's do that.
And we're going to run out of space here before long, so let me reclaim as much of this board as I can.
So what I'm going to do is I'm going to say, well, now that we've got this formula for alpha that relates alpha t to the error, then I can plug that into this formula up here, number 6.
And what I'll get is that the weight of t plus 1 is equal to the weight at t divided by that normalizing factor, multiplied times something that depends on whether it's categorized correctly or not.
That's what that y's in their for, right?
So we've got a logarithm here, and we got a sign flipper up there in terms of that H of x and y combination.
So if the sign of that whole thing at minus alpha and that y H combination turns out to be negative, then we're going to have to flip the numerator and denominator here in this logarithm, right?
And oh, by the way, since we've got a half out here, that turns out to be the square root of that term inside the logarithm.
So when we carefully do that, what we discover is that it depends on whether it's the right thing or not.
But what it turns out to be is something like a multiplier of the square root.
Better be careful, here.
The square root of what?
STUDENT: [INAUDIBLE].
PATRICK WINSTON: Well, let's see.
But we have to be careful.
So let's suppose that this is 4 things that we get correct.
So if we get it correct, then we're going to get the same sign out of H of x and y.
We've get a minus sign out there, so we're going to flip the numerator and denominator.
So we're going to get the square root of e of t over 1 minus epsilon of t if that's correct.
If it's wrong, it'll just be the flip of that.
So it'll be the square root of 1 minus the error rate over the error rate.
Everybody with me on that?
I think that's right.
If it's wrong, I'll have to hang myself and wear a paper bag over my head like I did last year.
But let's see if we can make this go correctly this time.
So now, we've got this guy here, we've got everything plugged in all right, and we know that now this z ought to be selected so that it's equal to the sum of this guy multiplied by these things as appropriate for whether it's correct or not.
Because we want, in the end, for all of these w's to add up to 1.
So let's see what they add up to without the z there.
So what we know is that it must be the case that if we add over the correct ones, we get the square root of the error rate over 1 minus the rate of the Wt plus 1.
Plus now we've got the sum of 1 minus the error rate over the error rate, times the sum of the Wi at time t for wrong.
So that's what we get if we added all these up without the z.
So since everything has to add up to 1, then z ought to be equal to this sum.
That looks pretty horrible, until we realize that if we add these guys up over the weights that are wrong, that is the error rate.
This is e.
So therefore, z is equal the square root of the error rate times 1 minus the error rate.
That's the contribution of this term.
Now, let's see.
What is the sum of the weights over the ones that are correct?
Well, that must be 1 minus the error rate.
Ah, so this thing gives you the same result as this one.
So z is equal to 2 times that.
And that's a good thing.
Now we are getting somewhere.
Because now, it becomes a little bit easier to write some things down.
Well, we're way past this, so let's get rid of this.
And now we can put some things together.
Let me point out what I'm putting together.
I've got an expression for z right here.
And I've got an expression for the new w's here.
So let's put those together and say that w of t plus 1 is equal to w of t.
I guess we're going to divide that by 2.
And then we've got this square root times that expression.
So if we take that correct one, and divide by that one, then the [INAUDIBLE] cancel out, and I get 1 over 1 minus the error rate.
That's it.
That's correct.
And if it's not correct, then it's Wt over 2-- and working through the math-- 1 over epsilon, if wrong.
Do we feel like we're making any progress?
No.
Because we haven't let it sing to us enough yet.
So I want to draw your attention to what happens to amateur rock climbers when they're halfway up a difficult cliff.
They're usually [INAUDIBLE], sometimes they're not.
If they're not, they're scared to death.
And every once in a while, as they're just about to fall, they find some little tiny hole to stick a fingernail in, and that keeps them from falling.
That's called a thank-god hole.
So what I'm about to introduce is the analog of those little places where you can stick your fingernail in.
It's the thank-god hole for dealing with boosting problems.
So what happens if I add all these [? Wi ?] up for the ones that the classifier where produces a correct answer on?
Well, it'll be 1 over 2, and 1 over 1 minus epsilon, times the sum of the Wt for which the answer was correct.
What's this sum?
Oh!
My goddess.
1 minus epsilon.
So what I've just discovered is that if I sum new w's over those samples for which I got a correct answer, it's equal to 1/2.
And guess what?
That means that if I sum them over wrong, it's equal to 1/2 half as well.
So that means that I take all of the weight for which I got the right answer with the previous test, and those ways will add up to something.
And to get the weights for the next generation, all I have to do is scale them so that they equal half.
This was not noticed by the people who developed this stuff.
This was noticed by Luis Ortiz, who was a 6.034 instructor a few years ago.
The sum of those weights is going to be a scaled version of what they were before.
So you take all the weights for which this new classifier-- this one you selected to give you the minimum weight on the re-weighted stuff-- you take the ones that it gives a correct answer for, and you take all of those weights, and you just scale them so they add up to 1/2.
So do you have to compute any logarithms?
No.
Do you have to compute any exponentials?
No.
Do you have to calculate z?
No.
Do you have to calculate alpha to get the new weights?
No.
All you have to do is scale them.
And that's a pretty good thank-god hole.
So that's thank-god hole number one.
Now, for thank-god hole number two, we need to go back and think about the fact that were going to give you problems in probability that involve decision tree stumps.
And there are a lot of decision tree stumps that you might have to pick from.
So we need a thank-god hole for deciding how to deal with that.
Where can I find some room?
How about right here.
Suppose you've got a space that looks like this.
I'm just makings this up at random.
So how many-- let's see.
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11.
How many tests do I have to consider in that dimension?
11.
It's 1 plus the number of samples.
That would be horrible.
I don't know.
Do I have actually calculate this one?
How could that possibly be better than that one?
It's got one more thing wrong.
So that one makes sense.
The other one doesn't make sense.
So in the end, no test that lies between two correctly classified samples will ever be any good.
So that one's a good guy, and that one's a good guy.
And this one's a bad guy.
Bad guy, bad guy bad guy, bad guy.
Bad guy, bad guy, bad buy.
So the actual number of tests you've got is three.
And likewise, in the other dimension-- well, I haven't drawn it so well here, but would this test be a good one?
No.
That one?
No.
Actually, I'd better look over here on the right and see what I've got before I draw too many conclusions.
Let's look over this, since I don't want to think too hard about what's going on in the other dimension.
But the idea is that very few of those tests actually matter.
Now, you say to me, there's one last thing.
What about overfitting?
Because all this does is drape a solution over the samples.
And like support vector machines overfit, neural maps overfit, identification trees overfit.
Guess what?
This doesn't seem to overfit.
That's an experimental result for which the literature is confused.
It goes back to providing an explanation.
So this stuff is tried on all sorts of problems, like handwriting recognition, understanding speech, all sorts of stuff uses boosting.
And unlike other methods, for some reason as yet imperfectly understood, it doesn't seem to overfit.
But in the end, they leave no stone unturned in 6.034.
Every time we do this, we do some additional experiments.
So here's a sample that I'll leave you with.
Here's a situation in which we have a 10-dimensional space.

That was just put into the space at random, so it can be viewed as an error point.
So now what we're going to do is we're going to see what happens when we run that guy.
And sure enough, in 17 steps, it finds a solution.
But maybe it's overfit that little guy who's an error.
But one thing you can do is you can say, well, all of these classifiers are dividing this space up into chunks, and we can compute the size of the space occupied by any sample.
So one thing we can do-- alas, I'll have to get up a new demonstration.
One thing we can do, now that this guy's over here, we can switch the volume tab and watch how the volume occupied by that error point evolves as we solve the problem.
So look what happens.
This is, of course, randomly generated.
I'm counting on this working.
Never failed before.
So it originally starts out as occupying 26% of the total volume.
It ends up occupying 1.4 times 10 to the minus 3rd% of the volume.
So what tends to happen is that these decision tree stumps tend to wrap themselves so tightly around the error points, there's no room for overfitting, because nothing else will fit in that same volume.
So that's why I think that this thing tends to produce solutions which don't overfit.
So in conclusion, this is magic.
You always want to use it.
It'll work with any kind of [? speed ?] of classifiers you want.
And you should understand it very thoroughly, because of anything is useful in the subject in dimension learning, this is it.


{% extends "layout.html" %} {% block page_title %} Sandbox welcome {% endblock %} {% block content %} Prototype This is a prototype of a new service – your feedback will help us to improve it. Analyst sandbox prototype User agreement About Choose sandbox Step 5 of 8 Choose or configure your sandbox I want to choose a commonly-used sandbox Select one of the options below What would you like to do today?
Select one of the options below
Continue


Simple Dependencies
Setting up the container is straightforward and easy:
var config = new BindingConfig();
config.Register<ITestService10, TestService10>();
var container = new Container(config);
You can then request a instance by calling GetInstance
:
var value = container.GetInstance<ITestService10>();
In this case a TestService10
instance will be returned.
Complex Dependencies
That wasnt that exciting right? All it did was calling the constructor to return a new instance. Lets say we have a slightly different config:
config.Register<ITestService10, TestService10>();
config.Register<ITestService11, TestService11>();
The TestService11
class looks like this:
public class TestService11 : ITestService11
{
public ITestService10 TestService10 { get; }
public TestService11(ITestService10 testService10)
{
TestService10 = testService10;
}
}
Now the container cannot simply call the constructor as the constructor needs another dependency. However its smart enough to understand that it has to use a new TestService10
instance as parameter since we configured that it should inject such a instance whenever a ITestService10
is needed. So the following will work:
var value = container.GetInstance<ITestService11>();
If there is only 1 constructor then Singularity will use that constructor's arguments types to determine what to inject. If there are more than 1 constructors then you need to use expressions to explicitly state what constructor you want:
config.Register<ITestService10, TestService10>();
config.Register<ITestService11>().Inject((ITestService10 testService10) => new TestService11(testService10));
In this case the expression arguments will be used to figure out what the needed dependencies are.
Where to go to from here?
I suggest you to read the article about lifetimes here


When viewing a map page of a supported mapping service (Google, Bing, OpenStreetMap etc.), click on the links in the MapSwitcher popup to open the same location, or the same route, in another mapping service.
Map Switcher is new - so some issues are to be expected.
Directions can be particularly troublesome, as different mapping services interpret natural language start and end points in very different ways. Sometimes this means the chosen waypoint locations may even be in different cities. Where coordinates are available, these are used instead, but this is not always possible. There's nothing Map Switcher can do about this.
If you find problems, please report them. Your feedback is valued.


What is FF7:SES?
Final Fantasy 7: Shinra Employment Services is a challenge run for the original FF7, similar in vein to what you might see in FF5's "Four Job Fiesta" challenge runs. The basic premise is rather than being able to use any Materia on any character you please, additional challenge is placed on the run via forcing each playable character into pre-generated (using this very website) jobs. For example, your Cloud may draw the job of the Pyromaniac and be limited to the following Materia: Fire, All, Elemental, Final Attack, MP Turbo, Magic Counter, Quadra Magic, Magic Plus, Mega All, MP Plus, Ifrit, and Phoenix.
Why do I need to log in?
Logging in allows the site to keep track of multiple runs for a single user. So by logging in, you are allowed to have more than one run registered on the site at a time. Your runs can have the chance of jobs being repeated, or be forced to have every job be unique via a switch on the New Run page.
Where can I go for more information?
Should you wish to read up more before starting, please come to our Discord and join the conversation! In the meantime good luck on your runs!


This function indicates if receive flow control is enabled in the MAC control register for the MAC port specified.
Arguments
portNum MAC port number for which the API must retrieve the settings. *
Return Value
TRUE Receive flow control enabled
FALSE Receive flow control disabled
Pre Condition
None
Post Condition
None
Reads
CPGMAC_SL_MACCONTROL_REG_RX_FLOW_EN
Example
* Uint32 portNum = 1; if (CSL_CPGMAC_SL_isRxFlowControlEnabled (portNum) == TRUE) { // rx flow control enabled } else { // rx flow control disabled }
|
inlinestatic |
============================================================================
CSL_CPGMAC_SL_isRxFlowControlEnabled
Description
This function indicates if receive flow control is enabled in the MAC control register for the MAC port specified.
Arguments
portNum MAC port number for which the API must retrieve the settings. *
Return Value
TRUE Receive flow control enabled
FALSE Receive flow control disabled
Pre Condition
None
Post Condition
None
Reads
CPGMAC_SL_MACCONTROL_REG_RX_FLOW_EN
Example
* Uint32 portNum = 1; if (CSL_CPGMAC_SL_isRxFlowControlEnabled (portNum) == TRUE) { // rx flow control enabled } else { // rx flow control disabled }
| Uint32 CSL_CPGMAC_SL_isRxFlowControlEnabled | ( | CSL_Xge_cpswRegs * | hCpswRegs, |
| Uint32 | portNum | ||
| ) |
============================================================================
CSL_CPGMAC_SL_isRxFlowControlEnabled
Description
This function indicates if receive flow control is enabled in the MAC control register for the MAC port specified.
Arguments
portNum MAC port number for which the API must retrieve the settings. *
Return Value
TRUE Receive flow control enabled
FALSE Receive flow control disabled
Pre Condition
None
Post Condition
None
Reads
XGE_CPSW_PN_MAC_CONTROL_REG_RX_FLOW_EN
Example
* Uint32 portNum = 1; if (CSL_CPGMAC_SL_isRxFlowControlEnabled (portNum) == TRUE) { // rx flow control enabled } else { // rx flow control disabled }
|
inlinestatic |
============================================================================
CSL_CPGMAC_SL_isTxFlowControlEnabled
Description
This function indicates if transmit flow control is enabled in the MAC control register for the MAC port specified.
Arguments
portNum MAC port number for which the API must retrieve the settings. *
Return Value
TRUE Transmit flow control enabled
FALSE Transmit flow control disabled
Pre Condition
None
Post Condition
None
Reads
CPGMAC_SL_MACCONTROL_REG_TX_FLOW_EN
Example
* Uint32 portNum = 1; if (CSL_CPGMAC_SL_isTxFlowControlEnabled (portNum) == TRUE) { // tx flow control enabled } else { // tx flow control disabled }
|
inlinestatic |
============================================================================
CSL_CPGMAC_SL_isTxFlowControlEnabled
Description
This function indicates if transmit flow control is enabled in the MAC control register for the MAC port specified.
Arguments
portNum MAC port number for which the API must retrieve the settings. *
Return Value
TRUE Transmit flow control enabled
FALSE Transmit flow control disabled
Pre Condition
None
Post Condition
None
Reads
CPGMAC_SL_MACCONTROL_REG_TX_FLOW_EN
Example
* Uint32 portNum = 1; if (CSL_CPGMAC_SL_isTxFlowControlEnabled (portNum) == TRUE) { // tx flow control enabled } else { // tx flow control disabled }
| Uint32 CSL_CPGMAC_SL_isTxFlowControlEnabled | ( | CSL_Xge_cpswRegs * | hCpswRegs, |
| Uint32 | portNum | ||
| ) |
============================================================================
CSL_CPGMAC_SL_isTxFlowControlEnabled
Description
This function indicates if transmit flow control is enabled in the MAC control register for the MAC port specified.
Arguments
portNum MAC port number for which the API must retrieve the settings. *
Return Value
TRUE Transmit flow control enabled
FALSE Transmit flow control disabled
Pre Condition
None
Post Condition
None
Reads
XGE_CPSW_PN_MAC_CONTROL_REG_TX_FLOW_EN
Example
* Uint32 portNum = 1; if (CSL_CPGMAC_SL_isTxFlowControlEnabled (portNum) == TRUE) { // tx flow control enabled } else { // tx flow control disabled }
|
inlinestatic |
============================================================================
CSL_CPGMAC_SL_isTxPaceEnabled
Description
This function indicates if transmit pacing is enabled in the MAC control register for the MAC port specified.
Arguments
portNum MAC port number for which the API must retrieve the settings. *
Return Value
TRUE Transmit pacing enabled
FALSE Transmit pacing disabled
Pre Condition
None
Post Condition
None
Reads
CPGMAC_SL_MACCONTROL_REG_TX_PACE
Example
* Uint32 portNum = 1; if (CSL_CPGMAC_SL_isTxPaceEnabled (portNum) == TRUE) { // tx pacing enabled } else { // tx pacing disabled }
| Uint32 CSL_CPGMAC_SL_isTxPaceEnabled | ( | CSL_Xge_cpswRegs * | hCpswRegs, |
| Uint32 | portNum | ||
| ) |
============================================================================
CSL_CPGMAC_SL_isTxPaceEnabled
Description
This function indicates if transmit pacing is enabled in the MAC control register for the MAC port specified.
Arguments
portNum MAC port number for which the API must retrieve the settings. *
Return Value
TRUE Transmit pacing enabled
FALSE Transmit pacing disabled
Pre Condition
None
Post Condition
None
Reads
XGE_CPSW_PN_MAC_CONTROL_REG_TX_PACE
Example
* Uint32 portNum = 1; if (CSL_CPGMAC_SL_isTxPaceEnabled (portNum) == TRUE) { // tx pacing enabled } else { // tx pacing disabled }
|
inlinestatic |
============================================================================
CSL_CPGMAC_SL_isTxPaceEnabled
Description
This function indicates if transmit pacing is enabled in the MAC control register for the MAC port specified.
Arguments
portNum MAC port number for which the API must retrieve the settings. *
Return Value
TRUE Transmit pacing enabled
FALSE Transmit pacing disabled
Pre Condition
None
Post Condition
None
Reads
CPGMAC_SL_MACCONTROL_REG_TX_PACE
Example
* Uint32 portNum = 1; if (CSL_CPGMAC_SL_isTxPaceEnabled (portNum) == TRUE) { // tx pacing enabled } else { // tx pacing disabled }
|
inlinestatic |
============================================================================
CSL_CPGMAC_SL_isTxShortGapEnabled
Description
This function indicates if Transmit short gap is enabled in the MAC control register for the MAC port specified.
Arguments
portNum MAC port number for which the API must retrieve the settings. *
Return Value
TRUE Transmit short gap with a short IPG enabled
FALSE Transmit short gap disabled.
Pre Condition
None
Post Condition
None
Reads
CPGMAC_SL_MACCONTROL_REG_TX_SHORT_GAP_ENABLE
Example
* Uint32 portNum = 1; if (CSL_CPGMAC_SL_isTxShortGapEnabled (portNum) == TRUE) { // Tx short gap enabled } else { // Tx short gap disabled }
| Uint32 CSL_CPGMAC_SL_isTxShortGapEnabled | ( | CSL_Xge_cpswRegs * | hCpswRegs, |
| Uint32 | portNum | ||
| ) |
============================================================================
CSL_CPGMAC_SL_isTxShortGapEnabled
Description
This function indicates if Transmit short gap is enabled in the MAC control register for the MAC port specified.
Arguments
portNum MAC port number for which the API must retrieve the settings. *
Return Value
TRUE Transmit short gap with a short IPG enabled
FALSE Transmit short gap disabled.
Pre Condition
None
Post Condition
None
Reads
XGE_CPSW_PN_MAC_CONTROL_REG_TX_SHORT_GAP_ENABLE
Example
* Uint32 portNum = 1; if (CSL_CPGMAC_SL_isTxShortGapEnabled (portNum) == TRUE) { // Tx short gap enabled } else { // Tx short gap disabled }
|
inlinestatic |
============================================================================
CSL_CPGMAC_SL_isTxShortGapEnabled
Description
This function indicates if Transmit short gap is enabled in the MAC control register for the MAC port specified.
Arguments
portNum MAC port number for which the API must retrieve the settings. *
Return Value
TRUE Transmit short gap with a short IPG enabled
FALSE Transmit short gap disabled.
Pre Condition
None
Post Condition
None
Reads
CPGMAC_SL_MACCONTROL_REG_TX_SHORT_GAP_ENABLE
Example
* Uint32 portNum = 1; if (CSL_CPGMAC_SL_isTxShortGapEnabled (portNum) == TRUE) { // Tx short gap enabled } else { // Tx short gap disabled }
| Uint32 CSL_CPGMAC_SL_isTxShortGapLimitEnabled | ( | CSL_Xge_cpswRegs * | hCpswRegs, |
| Uint32 | portNum | ||
| ) |
============================================================================
CSL_CPGMAC_SL_isTxShortGapLimitEnabled
Description
This function indicates if Transmit short gap limit is enabled in the MAC control register for the MAC port specified. When set this bit limits the number of short gap packets transmitted to 100ppm. Each time a short gap packet is sent, a counter is loaded with 10,000 and decremented on each wireside clock. Another short gap packet will not be sent out until the counter decrements to zero. This mode is included to preclude the host from filling up the FIFO and sending every packet out with short gap which would violate the maximum number of packets per second allowed. This bit is used only with GMII (not XGMII).
Arguments
portNum MAC port number for which the API must retrieve the settings. *
Return Value
TRUE Transmit short gap limit with a short IPG enabled
FALSE Transmit short gap limit disabled.
|
inlinestatic |
============================================================================
CSL_CPGMAC_SL_resetMac
Description
This function issues a software reset to the MAC for the MAC port number specified.
Arguments
portNum MAC port number for which the reset must be performed. *
Return Value
None
Pre Condition
None
Post Condition
None
Writes
CPGMAC_SL_SOFT_RESET_REG_SOFT_RESET=1
Example
Uint32 portNum = 1; CSL_CPGMAC_SL_resetMac (portNum);
|
inlinestatic |
============================================================================
CSL_CPGMAC_SL_resetMac
Description
This function issues a software reset to the MAC for the MAC port number specified.
Arguments
portNum MAC port number for which the reset must be performed. *
Return Value
None
Pre Condition
None
Post Condition
None
Writes
CPGMAC_SL_SOFT_RESET_REG_SOFT_RESET=1
Example
Uint32 portNum = 1; CSL_CPGMAC_SL_resetMac (portNum);
| void CSL_CPGMAC_SL_resetMac | ( | CSL_Xge_cpswRegs * | hCpswRegs, |
| Uint32 | portNum | ||
| ) |
============================================================================
CSL_CPGMAC_SL_resetMac
Description
This function issues a software reset to the MAC for the MAC port number specified.
Arguments
portNum MAC port number for which the reset must be performed. *
Return Value
None
Pre Condition
None
Post Condition
None
Writes
XGE_CPSW_PN_MAC_SOFT_RESET_REG_SOFT_RESET=1
Example
Uint32 portNum = 1; CSL_CPGMAC_SL_resetMac (portNum);
|
inlinestatic |
============================================================================
CSL_CPGMAC_SL_setEmulControlReg
Description
This function sets up the contents of Emulation control register for the MAC port specified.
Arguments
portNum MAC port for which the settings must be configured. emulFreeBit Emulation free bit. emulSoftBit Emulation soft bit. *
Return Value
None
Pre Condition
None
Post Condition
None
Reads
CPGMAC_SL_EMCONTROL_REG_FREE, CPGMAC_SL_EMCONTROL_REG_SOFT
Example
Uint32 emulSoftBit, emulFreeBit, portNum = 1; emulFreeBit = 1; emulSoftBit = 0; CSL_CPGMAC_SL_setEmulControlReg (portNum, emulFreeBit, emulSoftBit);
|
inlinestatic |
============================================================================
CSL_CPGMAC_SL_setEmulControlReg
Description
This function sets up the contents of Emulation control register for the MAC port specified.
Arguments
portNum MAC port for which the settings must be configured. emulFreeBit Emulation free bit. emulSoftBit Emulation soft bit. *
Return Value
None
Pre Condition
None
Post Condition
None
Reads
CPGMAC_SL_EMCONTROL_REG_FREE, CPGMAC_SL_EMCONTROL_REG_SOFT
Example
Uint32 emulSoftBit, emulFreeBit, portNum = 1; emulFreeBit = 1; emulSoftBit = 0; CSL_CPGMAC_SL_setEmulControlReg (portNum, emulFreeBit, emulSoftBit);
| void CSL_CPGMAC_SL_setEmulControlReg | ( | CSL_Xge_cpswRegs * | hCpswRegs, |
| Uint32 | portNum, | ||
| Uint32 | emulFreeBit, | ||
| Uint32 | emulSoftBit | ||
| ) |
============================================================================
CSL_CPGMAC_SL_setEmulControlReg
Description
This function sets up the contents of Emulation control register for the MAC port specified.
Arguments
portNum MAC port for which the settings must be configured. emulFreeBit Emulation free bit. emulSoftBit Emulation soft bit. *
Return Value
None
Pre Condition
None
Post Condition
None
Reads
XGE_CPSW_PN_MAC_EMCONTROL_REG_FREE, XGE_CPSW_PN_MAC_EMCONTROL_REG_SOFT
Example
Uint32 emulSoftBit, emulFreeBit, portNum = 1; emulFreeBit = 1; emulSoftBit = 0; CSL_CPGMAC_SL_setEmulControlReg (portNum, emulFreeBit, emulSoftBit);
| void CSL_CPGMAC_SL_setInterVLANCfg | ( | CSL_Xge_cpswRegs * | hCpswRegs, |
| Uint32 | portNum, | ||
| Uint32 | routeIndex, | ||
| CSL_CPSW_INTERVLANCFG * | pInterVLANCfg | ||
| ) |
============================================================================
CSL_CPGMAC_SL_setInterVLANCfg
Description
This function sets the intervlan configuration for the given port and route index
Arguments
* portNum Port number for which the intervlan configuration is queried * routeIndex Intervlan route index.Valid pointer locations are 1 to x * (where x is the number of locations - pointer location zero * is unused). * pInterVLANCfg Intervlan configuration structure to be set *
Return Value
none
|
inlinestatic |
============================================================================
CSL_CPGMAC_SL_setMacControlReg
Description
This function configures the contents of MAC control register in entirety.
Arguments
portNum MAC port number for which the reset must be performed. macControlRegVal value to be configured to the MAC control register. *
Return Value
None
Pre Condition
None
Post Condition
None
Writes
CPGMAC_SL_MACCONTROL_REG
Example
Uint32 macControlVal, portNum = 1; macControlVal = CSL_CPGMAC_SL_getMacControlReg (); // Enable full duplex, giagbit mode too macControlVal |= CSL_CPGMAC_SL_MACCONTROL_FULLDUPLEX_EN | CSL_CPGMAC_SL_MACCONTROL_GMII_EN; CSL_CPGMAC_SL_setMacControlReg (macControlVal, portNum);
|
inlinestatic |
============================================================================
CSL_CPGMAC_SL_setMacControlReg
Description
This function configures the contents of MAC control register in entirety.
Arguments
portNum MAC port number for which the reset must be performed. macControlRegVal value to be configured to the MAC control register. *
Return Value
None
Pre Condition
None
Post Condition
None
Writes
CPGMAC_SL_MACCONTROL_REG
Example
Uint32 macControlVal, portNum = 1; macControlVal = CSL_CPGMAC_SL_getMacControlReg (); // Enable full duplex, giagbit mode too macControlVal |= CSL_CPGMAC_SL_MACCONTROL_FULLDUPLEX_EN | CSL_CPGMAC_SL_MACCONTROL_GMII_EN; CSL_CPGMAC_SL_setMacControlReg (macControlVal, portNum);
| void CSL_CPGMAC_SL_setMacControlReg | ( | CSL_Xge_cpswRegs * | hCpswRegs, |
| Uint32 | portNum, | ||
| Uint32 | macControlRegVal | ||
| ) |
============================================================================
CSL_CPGMAC_SL_setMacControlReg
Description
This function configures the contents of MAC control register in entirety.
Arguments
portNum MAC port number for which the reset must be performed. macControlRegVal value to be configured to the MAC control register. *
Return Value
None
Pre Condition
None
Post Condition
None
Writes
CPGMAC_SL_MACCONTROL_REG
Example
Uint32 macControlVal, portNum = 1; macControlVal = CSL_CPGMAC_SL_getMacControlReg (); // Enable full duplex, giagbit mode too macControlVal |= CSL_CPGMAC_SL_MACCONTROL_FULLDUPLEX_EN | CSL_CPGMAC_SL_MACCONTROL_GMII_EN; CSL_CPGMAC_SL_setMacControlReg (macControlVal, portNum);
|
inlinestatic |
============================================================================
CSL_CPGMAC_SL_setMacRxPriMapReg
Description
This function sets up the contents of the MAC Receive Packet Priority to Header Priority Mapping Register for the MAC port specified.
Arguments
portNum MAC port for which the settings must be configured. pMacRxPriMap Array of MAC Rx priority map priority values that must be configured to the register. *
Return Value
None
Pre Condition
None
Post Condition
None
Writes
CPGMAC_SL_PRI_MAP_REG_PRI0, CPGMAC_SL_PRI_MAP_REG_PRI1, CPGMAC_SL_PRI_MAP_REG_PRI2, CPGMAC_SL_PRI_MAP_REG_PRI3, CPGMAC_SL_PRI_MAP_REG_PRI4, CPGMAC_SL_PRI_MAP_REG_PRI5, CPGMAC_SL_PRI_MAP_REG_PRI6, CPGMAC_SL_PRI_MAP_REG_PRI7
Example
* Uint32 i, pMacRxPriMap [8], portNum = 1; for (i = 0; i < 8; i ++) pMacRxPriMap [i] = i; CSL_CPGMAC_SL_setMacRxPriMapReg (portNum, pMacRxPriMap);
|
inlinestatic |
============================================================================
CSL_CPGMAC_SL_setMacRxPriMapReg
Description
This function sets up the contents of the MAC Receive Packet Priority to Header Priority Mapping Register for the MAC port specified.
Arguments
portNum MAC port for which the settings must be configured. pMacRxPriMap Array of MAC Rx priority map priority values that must be configured to the register. *
Return Value
None
Pre Condition
None
Post Condition
None
Writes
CPGMAC_SL_PRI_MAP_REG_PRI0, CPGMAC_SL_PRI_MAP_REG_PRI1, CPGMAC_SL_PRI_MAP_REG_PRI2, CPGMAC_SL_PRI_MAP_REG_PRI3, CPGMAC_SL_PRI_MAP_REG_PRI4, CPGMAC_SL_PRI_MAP_REG_PRI5, CPGMAC_SL_PRI_MAP_REG_PRI6, CPGMAC_SL_PRI_MAP_REG_PRI7
Example
* Uint32 i, pMacRxPriMap [8], portNum = 1; for (i = 0; i < 8; i ++) pMacRxPriMap [i] = i; CSL_CPGMAC_SL_setMacRxPriMapReg (portNum, pMacRxPriMap);
| void CSL_CPGMAC_SL_setMacRxPriMapReg | ( | CSL_Xge_cpswRegs * | hCpswRegs, |
| Uint32 | portNum, | ||
| Uint32 * | pMacRxPriMap | ||
| ) |
============================================================================
CSL_CPGMAC_SL_setMacRxPriMapReg
Description
This function sets up the contents of the MAC Receive Packet Priority to Header Priority Mapping Register for the MAC port specified.
Arguments
portNum MAC port for which the settings must be configured. pMacRxPriMap Array of MAC Rx priority map priority values that must be configured to the register. *
Return Value
None
Pre Condition
None
Post Condition
None
Writes
XGE_CPSW_PN_RX_PRI_MAP_REG_PRI0, XGE_CPSW_PN_RX_PRI_MAP_REG_PRI1, XGE_CPSW_PN_RX_PRI_MAP_REG_PRI2, XGE_CPSW_PN_RX_PRI_MAP_REG_PRI3, XGE_CPSW_PN_RX_PRI_MAP_REG_PRI4, XGE_CPSW_PN_RX_PRI_MAP_REG_PRI5, XGE_CPSW_PN_RX_PRI_MAP_REG_PRI6, XGE_CPSW_PN_RX_PRI_MAP_REG_PRI7
Example
* Uint32 i, pMacRxPriMap [8], portNum = 1; for (i = 0; i < 8; i ++) pMacRxPriMap [i] = i; CSL_CPGMAC_SL_setMacRxPriMapReg (portNum, pMacRxPriMap);
|
inlinestatic |
============================================================================
CSL_CPGMAC_SL_setRxMaxLen
Description
This function sets up the Receive maximum frame length in Receive Maximum length register for the MAC port number specified.
Arguments
portNum MAC port number for which the settings must be configured. *
Return Value
None
Pre Condition
None
Post Condition
None
Writes
CPGMAC_SL_RX_MAXLEN_REG_RX_MAXLEN
Example
Uint32 mtu, portNum = 1; mtu = 1518; CSL_CPGMAC_SL_setRxMaxLen (portNum, mtu);
|
inlinestatic |
============================================================================
CSL_CPGMAC_SL_setRxMaxLen
Description
This function sets up the Receive maximum frame length in Receive Maximum length register for the MAC port number specified.
Arguments
portNum MAC port number for which the settings must be configured. *
Return Value
None
Pre Condition
None
Post Condition
None
Writes
CPGMAC_SL_RX_MAXLEN_REG_RX_MAXLEN
Example
Uint32 mtu, portNum = 1; mtu = 1518; CSL_CPGMAC_SL_setRxMaxLen (portNum, mtu);
| Uint32 CSL_CPGMAC_SL_setRxMaxLen | ( | CSL_Xge_cpswRegs * | hCpswRegs, |
| Uint32 | portNum, | ||
| Uint32 | rxMaxLen | ||
| ) |
============================================================================
CSL_CPGMAC_SL_setRxMaxLen
Description
This function sets up the Receive maximum frame length in Receive Maximum Length register for the MAC port number specified.
Arguments
portNum MAC port number for which the settings must be configured. rxMaxLen the Receive maximum frame length to be configered into the Receive Maximum Length register *
Return Value
None
Pre Condition
None
Post Condition
None
Writes
XGE_CPSW_PN_RX_MAXLEN_REG_RX_MAXLEN
Example
Uint32 mtu, portNum = 1; mtu = 1518; CSL_CPGMAC_SL_setRxMaxLen (portNum, mtu);
|
inlinestatic |
============================================================================
CSL_CPGMAC_SL_setRxPauseTimerReg
Description
This function sets up the Receive pause timer value in Receive pause timer register for the MAC port specified.
Arguments
portNum MAC port number for which the settings must be configured. *
Return Value
None
Pre Condition
None
Post Condition
None
Writes
CPGMAC_SL_RX_PAUSE_REG_RX_PAUSETIMER
Example
Uint32 rxPauseTimer = 2, portNum = 1; CSL_CPGMAC_SL_setRxPauseTimerReg (portNum, rxPauseTimer);
|
inlinestatic |
============================================================================
CSL_CPGMAC_SL_setRxPauseTimerReg
Description
This function sets up the Receive pause timer value in Receive pause timer register for the MAC port specified.
Arguments
portNum MAC port number for which the settings must be configured. *
Return Value
None
Pre Condition
None
Post Condition
None
Writes
CPGMAC_SL_RX_PAUSE_REG_RX_PAUSETIMER
Example
Uint32 rxPauseTimer = 2, portNum = 1; CSL_CPGMAC_SL_setRxPauseTimerReg (portNum, rxPauseTimer);
| Uint32 CSL_CPGMAC_SL_setRxPauseTimerReg | ( | CSL_Xge_cpswRegs * | hCpswRegs, |
| Uint32 | portNum, | ||
| Uint32 | rxPauseTimer | ||
| ) |
============================================================================
CSL_CPGMAC_SL_setRxPauseTimerReg
Description
This function sets up the Receive pause timer value in Receive pause timer register for the MAC port specified.
Arguments
portNum MAC port number for which the settings must be configured. *
Return Value
None
Pre Condition
None
Post Condition
None
Writes
XGE_CPSW_PN_MAC_RX_PAUSETIMER_REG_RX_PAUSETIMER
Example
Uint32 rxPauseTimer = 2, portNum = 1; CSL_CPGMAC_SL_setRxPauseTimerReg (portNum, rxPauseTimer);
| Uint32 CSL_CPGMAC_SL_setTxGap | ( | CSL_Xge_cpswRegs * | hCpswRegs, |
| Uint32 | portNum, | ||
| Uint32 | txGap | ||
| ) |
============================================================================
CSL_CPGMAC_SL_setTxGap
Description
This function sets up the Transmit inter-packet gap in Transmit Gap register for the MAC port number specified.
Arguments
portNum MAC port number for which the settings must be configured. txGap Transmit inter-packet gap to be configured into the Tx Gap register *
Return Value
None
Pre Condition
None
Post Condition
None
Writes
XGE_CPSW_PN_MAC_TX_GAP_REG_TX_GAP
Example
Uint32 txGap, portNum = 1; txGap = 100; CSL_CPGMAC_SL_setTxGap (portNum, txGap);
|
inlinestatic |
============================================================================
CSL_CPGMAC_SL_setTxGap
Description
This function sets up the Transmit inter-packet gap in Transmit Gap register for the MAC port number specified.
Arguments
portNum MAC port number for which the settings must be configured. txGap Transmit inter-packet gap to be configured into the Tx Gap register *
Return Value
None
Pre Condition
None
Post Condition
None
Writes
XGE_CPSW_PN_MAC_TX_GAP_REG_TX_GAP
Example
Uint32 txGap, portNum = 1; txGap = 100; CSL_CPGMAC_SL_setTxGap (portNum, txGap);
|
inlinestatic |
============================================================================
CSL_CPGMAC_SL_setTxPauseTimerReg
Description
This function sets up the Transmit pause timer value in Transmit pause timer register for the MAC port number specified.
Arguments
portNum MAC port number for which the settings must be configured. *
Return Value
None
Pre Condition
None
Post Condition
None
Writes
CPGMAC_SL_TX_PAUSE_REG_TX_PAUSETIMER
Example
Uint32 txPauseTimer = 2, portNum = 1; CSL_CPGMAC_SL_setTxPauseTimerReg (portNum, txPauseTimer);
|
inlinestatic |
============================================================================
CSL_CPGMAC_SL_setTxPauseTimerReg
Description
This function sets up the Transmit pause timer value in Transmit pause timer register for the MAC port number specified.
Arguments
portNum MAC port number for which the settings must be configured. *
Return Value
None
Pre Condition
None
Post Condition
None
Writes
CPGMAC_SL_TX_PAUSE_REG_TX_PAUSETIMER
Example
Uint32 txPauseTimer = 2, portNum = 1; CSL_CPGMAC_SL_setTxPauseTimerReg (portNum, txPauseTimer);
| Uint32 CSL_CPGMAC_SL_setTxPauseTimerReg | ( | CSL_Xge_cpswRegs * | hCpswRegs, |
| Uint32 | portNum, | ||
| Uint32 | txPauseTimer | ||
| ) |
============================================================================
CSL_CPGMAC_SL_setTxPauseTimerReg
Description
This function sets up the Transmit pause timer value in Transmit pause timer register for the MAC port number specified.
Arguments
portNum MAC port number for which the settings must be configured. *
Return Value
None
Pre Condition
None
Post Condition
None
Writes
XGE_CPSW_PN_MAC_TX_PAUSETIMER_REG_TX_PAUSETIMER
Example
Uint32 txPauseTimer = 2, portNum = 1; CSL_CPGMAC_SL_setTxPauseTimerReg (portNum, txPauseTimer);