index.pdf March 20,

Size: px
Start display at page:

Download "index.pdf March 20,"

Transcription

1 ndex.pdf March 20, 20 ITI 2. Introducton to omputng II Impementaton -2-: usng an nner cass We use an nner cass to create the terators: Marce Turcotte Schoo of Informaton Technoogy and Engneerng Iterator (part II) Inner cass Impementaton: fa-fast Verson of March 20, 20 bstract These ecture notes are meant to be ooed at on a computer screen. o not prnt them uness t s necessary. n nstance of an nner cass cannot exst on ts own, t requres an nstance of the outer cass (the converse s not true); n nstance of an nner cass has access to the nstance varabes (and methods) of the (outer) obect that created t; cass Outer { cass Inner { Inner newinner() { return new Inner(); thn about nstance varabes and methods. Gettng n Touch wth your Inner ass (web resource) Inner cass Let s ca a non-statc nested cass an nner cass. n nstance of an nner cass cannot exst on ts own, t requres an nstance of the outer cass (but an nstance of the outer cass does not necessary requre an nstance of an nner cass); n nstance of an nner cass has access to the nstance varabes (and methods) of the (outer) obect that created t; cass Outer { cass Inner { Thn about nstance varabes and methods. pubc cass Outer { cass Inner { Inner() { System.out.prntn( "* new nstance of Inner cass *" ); pubc Outer() { System.out.prntn( "* new nstance of Outer cass *" ); cass Test { pubc statc vod man( Strng[] args ) { Outer o = new Outer(); ava Test smpy prnts * new nstance of Outer cass *,.e an nstance of the Outer cass can exst wthout the need to create an nstance of the nner cass (ths s not automatc). pubc cass Outer { cass Inner { Inner() { System.out.prntn( "* new nstance of Inner cass *" ); pubc Outer() { System.out.prntn( "* new nstance of Outer cass *" ); pubc statc vod doesnotwor() { Inner = new Inner(); Outer.ava:: non-statc varabe ths cannot be referenced from a statc context Inner = new Inner (); ^ n nstance of an nner cass can ony be created by an nstance of the outer cass!

2 ndex.pdf March 20, 20 2 pubc cass Outer { cass Inner { Inner() { System.out.prntn( "* new nstance of Inner cass *" ); Inner ; pubc Outer() { System.out.prntn( "* new nstance of Outer cass *" ); = new Inner(); cass Test { pubc statc vod man( Strng[] args ) { Outer o = new Outer(); > ava Test * new nstance of Outer cass * * new nstance of Inner cass * pubc cass Outer { prvate cass Inner { prvate Inner() { System.out.prntn( "* new nstance of Inner cass *" ); System.out.prntn( "vaue = " + vaue ); prvate Inner o; prvate Strng vaue; pubc Outer() { System.out.prntn( "* new nstance of Outer cass *" ); vaue = "from the nstance varabe of the outer obect"; o = new Inner(); cass Test { pubc statc vod man( Strng[] args ) { new Outer(); > ava Test * new nstance of Outer cass * * new nstance of Inner cass * vaue = from nstance varabe of the outer obect n nstance of an nner cass has access to the varabes and methods of ts outer cass! There are other subte detas about nner casses but our use w be mted to what has been descrbed n those sdes. statc nested cass needs to mae the reatonshp nner/outer cass expct! pubc cass Outer { prvate statc cass Inner { prvate Outer parent; // <-- prvate Inner( Outer parent ) { ths.parent = parent; // <-- System.out.prntn( "* new nstance of Inner cass *" ); System.out.prntn( "vaue = " + parent.vaue ); // <-- prvate Inner o; prvate Strng vaue; pubc Outer() { System.out.prntn( "* new nstance of Outer cass *" ); vaue = "from the nstance varabe of the outer obect"; o = new Inner( ths ); // <-- Inner cass: summary n nner cass s a nested cass that s not expctey or mpctey decared statc. The Java Language Specfcaton; n obect of the outer cass creates an nstance of an nner cass: n obect of an nner cass has one outer obect; n obect of the outer cass may have zero, one or severa nstances of ts nner cass; n obect of an nner cass has access to the nstance varabes and methods of ts outer obect.

3 ndex.pdf March 20, 20 3 LnedLst<Strng> = new LnedLst<Strng>();.addLast( "" );.addlast( "" );.addlast( "" );.addlast( "" ); LnedLst<Integer> 2 = new LnedLst<Integer>(); 2.addLast( new Integer( ) ); 2.addLast( new Integer( 2 ) ); 2.addLast( new Integer( 3 ) ); Iterator<Strng>, ; Iterator<Integer> ; =.terator(); =.terator(); = 2.terator(); 2 2 f (.hasnext() ) { Strng o =.next(); 2 2 whe (.hasnext() ) { Strng o =.next(); f (.hasnext() ) { Strng o =.next();

4 ndex.pdf March 20, f (.hasnext() ) { Integer o =.next(); whe (.hasnext() ) { Integer o =.next(); pubc cass LnedLst<E> mpements Lst<E> { prvate statc cass Node<E> { Node<E> ; Each obect must have a varabe (nstance), a reference to the eement that t desgnates, : pubc cass LnedLst<E> mpements Lst<E> { prvate cass LstIterator mpements Iterator<E> { // LnedLstIterator s an nner cass; LnedLstIterator mpements Iterator; LnedLst undernedoes not mpement Iterator. prvate statc cass Node<E> { prvate Node<E> ; prvate cass LstIterator mpements Iterator<E> { prvate Node ; // <--- What are the nstance varabe of a LnedLstIterator? The new mpementaton aows for severa terators to co-exst. Its constructor ntases to nu, a vaue whch, symbocay, desgnates beng before the start of the st. pubc cass LnedLst<E> mpements Lst<E> { prvate statc cass Node<E> { prvate Node<E> ; prvate cass LstIterator mpements Iterator<E> { prvate Node<E> ; prvate LstIterator() { = nu; // <---

5 ndex.pdf March 20, 20 How to create an terator? pubc cass LnedLst<E> mpements Lst<E> { prvate statc cass Node<E> { prvate Node<E> ; prvate cass LstIterator mpements Iterator<E> { prvate Node<E> ; prvate LstIterator() { = nu; pubc Iterator<E> terator() { return new LstIterator(); // <--- terator(): s an nstance method of an obect of the cass LnedLst. pubc cass LnedLst<E> mpements Lst<E> { prvate statc cass Node<E> { prvate Node<E> ; prvate cass LstIterator mpements Iterator<E> { prvate Node<E> ; prvate LstIterator() { = nu; pubc E next() { f ( == nu ) { = ; ese { =.next; return.vaue; pubc booean hasnext() { pubc Iterator<E> terator() { return new LstIterator<E>(); Usage Lst<oube> doubes = new LnedLst<oube>(); doubes.add( new oube(. ) ); doubes.add( new oube( 3.2 ) ); doube sum = 0.0; Iterator<oube> = doubes.terator(); whe (.hasnext() ) { oube v =.next(); sum = sum + v.doubevaue(); Is t fast? We ve wored hard to create a mechansm to traverse the st. What s worth t? # nodes nsde terator (ms) (ms) 0, , , , , Exercse: trace the executon of the above statements. Many terators Lst<oube> doubes = new LnedLst<oube>(); add( E o ) and remove() Let s add two methods to the nterface Iterator, add( E o ) and remove(). for ( nt c=0; c<; c++ ) { doubes.add( new oube( c ) ); Iterator<oube> = doubes.terator(); whe (.hasnext() ) { oube Va =.next(); Iterator<oube> = doubes.terator(); whe (.hasnext() ) { oube Va =.next(); System.out.prntn( "("+Va+","+Va+")" ); (0.0,0.0), (0.0,.0),..., (0.0,4.0),..., (4.0,4.0).

6 ndex.pdf March 20, 20 6 add() y defnton,.add( vaue ) w nsert the new vaue mmedatey before the next eement that woud be returned by next(). Therefore, the next ca to next() s unaffected! doubes frst doubes frst a to.add( new oube( 3.42 ) ), addng an eement at an ntermedate poston n the st, notce that.next() returns the same vaue wth or wthout the nserton! doubes frst doubes frst doubes frst doubes frst ddng an eement when the terator s postoned to the eft of the st,.add( new oube(.68 ) ), agan.next() returns the same vaue wth or wthout nserton. ddng an eement when postoned at the end of the st,.add( new oube(.68 ) ), notce that hasnext() returns the same vaue wth or wthout nserton! pubc cass LnedLst<E> mpements Lst<E> { prvate statc cass Node<E> { prvate Node<E> frst; prvate cass LstIterator mpements Iterator<E> { prvate Node<E> ; prvate LstIterator() { = nu; pubc E next() { pubc booean hasnext() { pubc booean add(e o) { f ( o == nu ) return fase; f ( == nu ) { frst = new Node<E>( o, frst ); = frst; ese {.next = new Node<E>( o,.next ); =.next; return true; pubc vod remove() { pubc Iterator<E> terator() { return new LstIterator(); // a the usua methods of LnedLst

7 ndex.pdf March 20, sebuodtsatsrftneruc What woud the foowng test program dspay? pubc cass Test { pubc statc vod man( Strng[] args ) { LnedLst<Strng> = new LnedLst<Strng>(); Iterator<Strng> =.terator(); for ( nt c=0; c<; c++ ) {.add( "eement-" + c ); =.terator(); whe (.hasnext() ) { System.out.prntn(.next() ); eement-0 eement- eement-2 eement-3 eement-4 remove() Removes from the st the eement that was returned by next(). ca.add( vaue ) mmedatey foowed by.remove() eeps the st unchanged. doubes frst doubes frst Notce that remove() does return the eement that was removed, t s ntended that a prevous ca to next() has saved the vaue. Removng an eement at an ntermedate poston,.remove(), notce that the vaue of.next() s the same wth or wthout remova. doubes frst doubes frst doubes frst Removng the eement,.remove(), the vaue of hasnext() s the same wth or wthout remova. Removng the frst eement,.remove(), the vaue of.next() remans unchanged.

8 ndex.pdf March 20, 20 8 Iterator pubc nterface Iterator<E> { pubc abstract E next(); pubc abstract booean hasnext(); pubc abstract vod add( E o ); pubc abstract vod remove(); pubc abstract booean hasprevous(); nt sze(); vod add( E o ); E get( nt pos ); E remove( nt pos ); Iterator<E> terator(); Pubc methods of LnedLst Lmtaton of the mpementaton? on modfcatons to the st! Havng many terators on the same st poses no probems as ong as ong no con modfcatons occur. onsder: Many terators and con modfcatons [.68, 2.78, 3.42, 7.389, 9.806] What woud occur f a program cas.remove()? What shoud occur of? onsder: [.68, 2.78, 3.42, 7.389, 9.806] fter the ca.remove() what shoud be the vaue of.next()? frst frst onsder what woud occur after.remove(). s now nvad!

9 ndex.pdf March 20, 20 9 Impementaton 3: fa-fast frst frst The souton that we w adopt s caed fa-fast and conssts of mang an terator nvad as soon as a modfcaton to the st has occurred that was not made by the terator tsef;.e. the modfcaton was made by another terator or an nstance method of the cass LnedLst. Impementng ths souton requres:. ddng a counter of modfcatons to the er of the st (); 2. ddng a counter of modfcatons to the terators (expectedmodount); 0 = new LnedLst(); frst addFrst( new oube( 2.0 ) );.addfrst( new oube( ) ); frst 3.deeteFrst();. When creatng a new st, the modfcaton counter s set to 0; 2. Notce that counts the number of modfcatons and not the number of eements n the st. Foowng the ca to deetefrst(), s 3 and not. frst 2.0 frst frst frst addFrst( 2.0 );.addfrst( 3.0 );.next();.next(); frst Iterator = terator(); frst next(); reatng a new Iterator does not change! Smary, traversng the st does not change. hanges to the cass LnedLst 6 The st operatons that modfy the st, addfst, deetefrst, etc. change the vaue of. must now When creatng a new st, must be set to zero. frst frst oth terators are vad.remove(); The terator whose expectedmodount has the same vaue as the one n the er of the st remans vad; a the other ones are not.

10 ndex.pdf March 20, 20 0 Modfcatons to LstIterator svad() When creatng a new terator, the vaue from the er of the st must be coped to the nstance varabe expectedmodount. The methods for addng and removng eements must update both, ther own expectedmodount and n the er of the st. To factate wrtng the methods of the nner cass LstIterator, we create a new method caed svad(). The method checs that expectedmodount ==. the terator s methods must be changed so that the precondton s vad? s true, otherwse they must throw the approprate excepton, onmodfcatonexcepton. Iterator and new for oop Lst<Integer> nts = rrays.aslst(, 2, 3, 4, ); nt s = 0; for ( Iterator<Integer> t = nts.terator(); t.hasnext(); ) { Integer = t.next(); s +=.ntvaue(); System.out.prntn( s ); Iterator and new for oop Java ntroduces a new syntax for the for oop that automagcay creates and uses an terator to traverse a st, and unboxes the eements returned by the teraton. Lst<Integer> nts = rrays.aslst(, 2, 3, 4, ); nt s = 0; for ( nt : nts ) { s += ; System.out.prntn( s ); Iterator and new for oop Lst<Integer> nts = rrays.aslst(, 2, 3, 4, ); nt s = 0; for ( nt : nts ) { s += ; System.out.prntn( s ); What type can be used wth the new for oop? ny type that has an terator. What s the Java way to enforce ths? ny cass that mpements the nterface Iterabe<E>. Iterabe<E> pubc nterface Iterabe<E> { pubc Iterator<E> terator(); where pubc nterface Iterator<E> { pubc booean hasnext(); pubc E next(); pubc vod remove();

11 ndex.pdf March 20, 20 Iterabe Iterabe pubc cass LnedLst<E> mpements Lst<E>, Iterabe<E> { prvate statc cass Node<T> { prvate Node<E> ; prvate cass LstIterator mpements Iterator<E> { pubc nterface Lst<E> extends Iterabe<E> { pubc cass LnedLst<E> mpements Lst<E> { prvate statc cass Node<T> { prvate Node<E> ; prvate cass LstIterator mpements Iterator<E> { rrays and new for oop For the sae of competeness, the new for oop can aso be apped to arrays. nt[] xs = new nt[] {, 2, 3 ; nt sum = 0; for ( nt x : xs ) { sum += x; ppendx : ccessng Members of the Outer Obect In the prevous exampe, the modfcaton counter of the nner cass (expectedmodount) was gven a dfferent name than that of the outer cass () to avod a name confct. The syntax LnedLst.ths. coud aso be used n the nner cass (LstIterator) to refer to the nstance varabe of the outer obect (LnedLst). pubc cass Outer { prvate nt vaue = 99; pubc cass Inner { prvate nt vaue; pubc Inner() { ths.vaue = Outer.ths.vaue + ; pubc nt getvaue() { return vaue; pubc Inner newinner() { return new Inner(); pubc nt getvaue() { return vaue; ccessng Members of the Outer Obect cass Test { pubc statc vod man( Strng[] args ) { Outer o = new Outer(); System.out.prntn( "o.getvaue() -> " + o.getvaue() ); Outer.Inner = o.newinner(); System.out.prntn( ".getvaue() -> " +.getvaue() ); System.out.prntn( "o.getvaue() -> " + o.getvaue() );

12 ndex.pdf March 20, 20 2 ccessng Members of the Outer Obect dvanced (optona) exampe // > ava Test // o.getvaue() -> 99 //.getvaue() -> 00 // o.getvaue() -> 99 pubc cass { prvate nt vaue = 99; pubc cass { prvate nt vaue; pubc () { ths.vaue =.ths.vaue + ; pubc cass { prvate nt vaue; pubc () { ths.vaue =.ths.vaue + ; pubc nt getvaue() { System.out.prntn( ".ths.vaue = " +.ths.vaue ); System.out.prntn( ".ths.vaue = " +.ths.vaue ); System.out.prntn( "ths.vaue = " + ths.vaue ); return vaue; cass { pubc statc vod man( Strng[] args ) {.. abc = new ().new ().new (); System.out.prntn( "abc.getvaue() -> " + abc.getvaue() ); // > ava //.ths.vaue = 99 //.ths.vaue = 00 // ths.vaue = 0 // abc.getvaue() -> 0

ITI Introduction to Computing II

ITI Introduction to Computing II ITI 1121. Introduction to Computing II Marcel Turcotte School of Information Technology and Engineering Iterator (part II) Inner class Implementation: fail-fast Version of March 20, 2011 Abstract These

More information

ITI Introduction to Computing II

ITI Introduction to Computing II ITI 1121. Introduction to Computing II Iterator 1 (part I) Marcel Turcotte School of Electrical Engineering and Computer Science Version of March 26, 2013 Abstract These lecture notes are meant to be looked

More information

ITI Introduction to Computing II

ITI Introduction to Computing II ITI 1121. Introduction to Computing II Iterator 1 (part I) Marcel Turcotte School of Electrical Engineering and Computer Science Version of March 24, 2013 Abstract These lecture notes are meant to be looked

More information

index.pdf March 17,

index.pdf March 17, index.pdf March 17, 2013 1 ITI 1121. Introduction to omputing II Marce Turcotte Schoo of Eectrica Engineering and omputer Science Linked List (Part 2) Tai pointer ouby inked ist ummy node Version of March

More information

Final Exam. CSE Section M, Winter p. 1 of 16. Family Name: Given Name(s): Student Number:

Final Exam. CSE Section M, Winter p. 1 of 16. Family Name: Given Name(s): Student Number: Fna Exam CSE 1020 3.0 Secton M, Wnter 2010 p. 1 o 16 Famy Name: Gven Name(s): Student Numer: Gudenes and Instructons: 1. Ths s a 90-mnute exam. You can use the textook, ut no eectronc ads such as cacuators,

More information

ITI Introduction to Computing II

ITI Introduction to Computing II ITI 1121. Introduction to Computing II Iterator 1 (part I) Marcel Turcotte School of Electrical Engineering and Computer Science Version of March 26, 2013 Abstract These lecture notes are meant to be looked

More information

I ~ ~ i. ~ ~ i d) All of the above. i ~ I. ~ 2. A is a window used to communicate with users. ~ i ~ b) control ~ j ~

I ~ ~ i. ~ ~ i d) All of the above. i ~ I. ~ 2. A is a window used to communicate with users. ~ i ~ b) control ~ j ~ t " "" E-Mansoura Unversty.. Subect: Programmng Language 3 (CSE 3223) Facuty of Engneerng.. Date: Wednesday, 13 June,2012 2 nd Year Students, Tme Aowed: Three Hours, Computers & Systems Engneerng Dept.

More information

Sequential search. Building Java Programs Chapter 13. Sequential search. Sequential search

Sequential search. Building Java Programs Chapter 13. Sequential search. Sequential search Sequental search Buldng Java Programs Chapter 13 Searchng and Sortng sequental search: Locates a target value n an array/lst by examnng each element from start to fnsh. How many elements wll t need to

More information

Agenda & Reading. Simple If. Decision-Making Statements. COMPSCI 280 S1C Applications Programming. Programming Fundamentals

Agenda & Reading. Simple If. Decision-Making Statements. COMPSCI 280 S1C Applications Programming. Programming Fundamentals Agenda & Readng COMPSCI 8 SC Applcatons Programmng Programmng Fundamentals Control Flow Agenda: Decsonmakng statements: Smple If, Ifelse, nested felse, Select Case s Whle, DoWhle/Untl, For, For Each, Nested

More information

FunctionF. u nc t. Functions. CSC 211 Intermediate Programming. Functions. Why use functions? Calling a function. Function Definition.

FunctionF. u nc t. Functions. CSC 211 Intermediate Programming. Functions. Why use functions? Calling a function. Function Definition. CSC Intermedate Programmng Functons A C++ program s a coecton of one or more subprograms nown as functons There must be a functon named man() Input(s) FunctonF u nc t Output The operatng system cas t,

More information

Terminal Window. 11. Section 7 Exercises Program Memory Exercise 7-1 Swap Values in an Array Working memory Global Memory. 2 nd call 3 rd call

Terminal Window. 11. Section 7 Exercises Program Memory Exercise 7-1 Swap Values in an Array Working memory Global Memory. 2 nd call 3 rd call 11. Secton 7 Exercses Program Memory Exercse 7-1 Swap Values n an Array Workng memory Global Memory class SwapTlYouDrop publc statc vod man (Strng args[ ]) nt = 0; nt a; a = new nt[] 2, 4, 6, 8, 10, 12

More information

Notes on Organizing Java Code: Packages, Visibility, and Scope

Notes on Organizing Java Code: Packages, Visibility, and Scope Notes on Organzng Java Code: Packages, Vsblty, and Scope CS 112 Wayne Snyder Java programmng n large measure s a process of defnng enttes (.e., packages, classes, methods, or felds) by name and then usng

More information

Problem Set 3 Solutions

Problem Set 3 Solutions Introducton to Algorthms October 4, 2002 Massachusetts Insttute of Technology 6046J/18410J Professors Erk Demane and Shaf Goldwasser Handout 14 Problem Set 3 Solutons (Exercses were not to be turned n,

More information

Vectorization in the Polyhedral Model

Vectorization in the Polyhedral Model Vectorzaton n the Polyhedral Model Lous-Noël Pouchet pouchet@cse.oho-state.edu Dept. of Computer Scence and Engneerng, the Oho State Unversty October 200 888. Introducton: Overvew Vectorzaton: Detecton

More information

News. Recap: While Loop Example. Reading. Recap: Do Loop Example. Recap: For Loop Example

News. Recap: While Loop Example. Reading. Recap: Do Loop Example. Recap: For Loop Example Unversty of Brtsh Columba CPSC, Intro to Computaton Jan-Apr Tamara Munzner News Assgnment correctons to ASCIIArtste.java posted defntely read WebCT bboards Arrays Lecture, Tue Feb based on sldes by Kurt

More information

Arrays. Array Data Type. Array - Memory Layout. Array Terminology. Gaddis: 7.1-4,6

Arrays. Array Data Type. Array - Memory Layout. Array Terminology. Gaddis: 7.1-4,6 Arrays Unit 5 Gaddis: 7.1-4,6 CS 1428 Fa 2017 Ji Seaman Array Data Type Array: a variabe that contains mutipe vaues of the same type. Vaues are stored consecutivey in memory. An array variabe definition

More information

Pass by Reference vs. Pass by Value

Pass by Reference vs. Pass by Value Pass by Reference vs. Pass by Value Most methods are passed arguments when they are called. An argument may be a constant or a varable. For example, n the expresson Math.sqrt(33) the constant 33 s passed

More information

Straight-line code (or IPO: Input-Process-Output) If/else & switch. Relational Expressions. Decisions. Sections 4.1-6, , 4.

Straight-line code (or IPO: Input-Process-Output) If/else & switch. Relational Expressions. Decisions. Sections 4.1-6, , 4. If/ese & switch Unit 3 Sections 4.1-6, 4.8-12, 4.14-15 CS 1428 Spring 2018 Ji Seaman Straight-ine code (or IPO: Input-Process-Output) So far a of our programs have foowed this basic format: Input some

More information

Sorting. Sorted Original. index. index

Sorting. Sorted Original. index. index 1 Unt 16 Sortng 2 Sortng Sortng requres us to move data around wthn an array Allows users to see and organze data more effcently Behnd the scenes t allows more effectve searchng of data There are MANY

More information

Introduction to Programming. Lecture 13: Container data structures. Container data structures. Topics for this lecture. A basic issue with containers

Introduction to Programming. Lecture 13: Container data structures. Container data structures. Topics for this lecture. A basic issue with containers 1 2 Introducton to Programmng Bertrand Meyer Lecture 13: Contaner data structures Last revsed 1 December 2003 Topcs for ths lecture 3 Contaner data structures 4 Contaners and genercty Contan other objects

More information

Compiler Design. Spring Register Allocation. Sample Exercises and Solutions. Prof. Pedro C. Diniz

Compiler Design. Spring Register Allocation. Sample Exercises and Solutions. Prof. Pedro C. Diniz Compler Desgn Sprng 2014 Regster Allocaton Sample Exercses and Solutons Prof. Pedro C. Dnz USC / Informaton Scences Insttute 4676 Admralty Way, Sute 1001 Marna del Rey, Calforna 90292 pedro@s.edu Regster

More information

Arrays. Array Data Type. Array - Memory Layout. Array Terminology. Gaddis: 7.1-3,5

Arrays. Array Data Type. Array - Memory Layout. Array Terminology. Gaddis: 7.1-3,5 Arrays Unit 5 Gaddis: 7.1-3,5 CS 1428 Spring 2018 Ji Seaman Array Data Type Array: a variabe that contains mutipe vaues of the same type. Vaues are stored consecutivey in memory. An array variabe decaration

More information

Outerjoins, Constraints, Triggers

Outerjoins, Constraints, Triggers Outerjoins, Constraints, Triggers Lecture #13 Autumn, 2001 Fa, 2001, LRX #13 Outerjoins, Constraints, Triggers HUST,Wuhan,China 358 Outerjoin R S = R S with danging tupes padded with nus and incuded in

More information

Hadoop-Based Similarity Computation System for Composed Documents

Hadoop-Based Similarity Computation System for Composed Documents Journa of Computer an Communcatons, 2015, 3, 196-202 Pubshe Onne May 2015 n ScRes. http://www.scrp.org/ourna/cc http://x.o.org/10.4236/cc.2015.35025 Haoop-Base Smarty Computaton System for Compose Documents

More information

Esc101 Lecture 1 st April, 2008 Generating Permutation

Esc101 Lecture 1 st April, 2008 Generating Permutation Esc101 Lecture 1 Aprl, 2008 Generatng Permutaton In ths class we wll look at a problem to wrte a program that takes as nput 1,2,...,N and prnts out all possble permutatons of the numbers 1,2,...,N. For

More information

Functions. 6.1 Modular Programming. 6.2 Defining and Calling Functions. Gaddis: 6.1-5,7-10,13,15-16 and 7.7

Functions. 6.1 Modular Programming. 6.2 Defining and Calling Functions. Gaddis: 6.1-5,7-10,13,15-16 and 7.7 Functions Unit 6 Gaddis: 6.1-5,7-10,13,15-16 and 7.7 CS 1428 Spring 2018 Ji Seaman 6.1 Moduar Programming Moduar programming: breaking a program up into smaer, manageabe components (modues) Function: a

More information

Programming in Fortran 90 : 2017/2018

Programming in Fortran 90 : 2017/2018 Programmng n Fortran 90 : 2017/2018 Programmng n Fortran 90 : 2017/2018 Exercse 1 : Evaluaton of functon dependng on nput Wrte a program who evaluate the functon f (x,y) for any two user specfed values

More information

An Optimal Algorithm for Prufer Codes *

An Optimal Algorithm for Prufer Codes * J. Software Engneerng & Applcatons, 2009, 2: 111-115 do:10.4236/jsea.2009.22016 Publshed Onlne July 2009 (www.scrp.org/journal/jsea) An Optmal Algorthm for Prufer Codes * Xaodong Wang 1, 2, Le Wang 3,

More information

A Taste of Java and Object-Oriented Programming

A Taste of Java and Object-Oriented Programming Introducn Computer Scence Shm Schocken IDC Herzlya Lecture 1-2: Lecture 1-2: A Taste Java Object-Orented Programmng A Taste Java OO programmng, Shm Schocken, IDC Herzlya, www.ntro2cs.com slde 1 Lecture

More information

CE 221 Data Structures and Algorithms

CE 221 Data Structures and Algorithms CE 1 ata Structures and Algorthms Chapter 4: Trees BST Text: Read Wess, 4.3 Izmr Unversty of Economcs 1 The Search Tree AT Bnary Search Trees An mportant applcaton of bnary trees s n searchng. Let us assume

More information

CSCI 104 Sorting Algorithms. Mark Redekopp David Kempe

CSCI 104 Sorting Algorithms. Mark Redekopp David Kempe CSCI 104 Sortng Algorthms Mark Redekopp Davd Kempe Algorthm Effcency SORTING 2 Sortng If we have an unordered lst, sequental search becomes our only choce If we wll perform a lot of searches t may be benefcal

More information

Parallel Numerics. 1 Preconditioning & Iterative Solvers (From 2016)

Parallel Numerics. 1 Preconditioning & Iterative Solvers (From 2016) Technsche Unverstät München WSe 6/7 Insttut für Informatk Prof. Dr. Thomas Huckle Dpl.-Math. Benjamn Uekermann Parallel Numercs Exercse : Prevous Exam Questons Precondtonng & Iteratve Solvers (From 6)

More information

Optimal Allocation of Multi-Platform Sensor Resources for Multiple Target Tracking

Optimal Allocation of Multi-Platform Sensor Resources for Multiple Target Tracking 4th Internatona Conference on Informaton Fuson Chcago, Inos, USA, Juy 5-8, 0 Optma Aocaton of Mut-Patform Sensor Resources for Mutpe Target Tracng Gary Asns Space and Arborne Systems Raytheon Company E

More information

Outline. CIS 110: Introduction to Computer Programming. Review: Interactive Sum. More Cumulative Algorithms. Interactive Sum Trace (2)

Outline. CIS 110: Introduction to Computer Programming. Review: Interactive Sum. More Cumulative Algorithms. Interactive Sum Trace (2) Outlne CIS 110: Introducton to Computer Programmng More on Cumulatve Algorthms Processng Text Tacklng Programmng Problems Lecture 11 Text Processng and More On Desgn ( 4.2-4.3) 10/17/2011 CIS 110 (11fa)

More information

UTILITY-BASED DYNAMIC CAMERA ASSIGNMENT AND HAND-OFF IN A VIDEO NETWORK

UTILITY-BASED DYNAMIC CAMERA ASSIGNMENT AND HAND-OFF IN A VIDEO NETWORK UTILITY-BASED DYNAMIC CAMERA ASSIGNMENT AND HAND-OFF IN A VIDEO NETWORK Ymng L and Br Bhanu Center for Research n Integent Systems Unversty of Caforna at Rversde Rversde, CA 9252, USA E-ma: ym@vsab.ucr.edu;

More information

CS1100 Introduction to Programming

CS1100 Introduction to Programming Factoral (n) Recursve Program fact(n) = n*fact(n-) CS00 Introducton to Programmng Recurson and Sortng Madhu Mutyam Department of Computer Scence and Engneerng Indan Insttute of Technology Madras nt fact

More information

l Tree: set of nodes and directed edges l Parent: source node of directed edge l Child: terminal node of directed edge

l Tree: set of nodes and directed edges l Parent: source node of directed edge l Child: terminal node of directed edge Trees & Heaps Week 12 Gaddis: 20 Weiss: 21.1-3 CS 5301 Fa 2016 Ji Seaman 1 Tree: non-recursive definition Tree: set of nodes and directed edges - root: one node is distinguished as the root - Every node

More information

CMPS 10 Introduction to Computer Science Lecture Notes

CMPS 10 Introduction to Computer Science Lecture Notes CPS 0 Introducton to Computer Scence Lecture Notes Chapter : Algorthm Desgn How should we present algorthms? Natural languages lke Englsh, Spansh, or French whch are rch n nterpretaton and meanng are not

More information

Loop Transformations for Parallelism & Locality. Review. Scalar Expansion. Scalar Expansion: Motivation

Loop Transformations for Parallelism & Locality. Review. Scalar Expansion. Scalar Expansion: Motivation Loop Transformatons for Parallelsm & Localty Last week Data dependences and loops Loop transformatons Parallelzaton Loop nterchange Today Scalar expanson for removng false dependences Loop nterchange Loop

More information

CS240: Programming in C. Lecture 12: Polymorphic Sorting

CS240: Programming in C. Lecture 12: Polymorphic Sorting CS240: Programmng n C ecture 12: Polymorphc Sortng Sortng Gven a collecton of tems and a total order over them, sort the collecton under ths order. Total order: every tem s ordered wth respect to every

More information

Complex Numbers. Now we also saw that if a and b were both positive then ab = a b. For a second let s forget that restriction and do the following.

Complex Numbers. Now we also saw that if a and b were both positive then ab = a b. For a second let s forget that restriction and do the following. Complex Numbers The last topc n ths secton s not really related to most of what we ve done n ths chapter, although t s somewhat related to the radcals secton as we wll see. We also won t need the materal

More information

Hermite Splines in Lie Groups as Products of Geodesics

Hermite Splines in Lie Groups as Products of Geodesics Hermte Splnes n Le Groups as Products of Geodescs Ethan Eade Updated May 28, 2017 1 Introducton 1.1 Goal Ths document defnes a curve n the Le group G parametrzed by tme and by structural parameters n the

More information

namel + name2; ttnew" + "De]-hi";

namel + name2; ttnew + De]-hi; 166 Prognmmngwth Java: A Pmer Strng fr,-name Strng cty where name and name} are Java strngs contanng strn$ constants. Another exampe s: System.out.prntn (frstname + "Kumar" ; Strng Arrays name + name2;

More information

VRT012 User s guide V0.1. Address: Žirmūnų g. 27, Vilnius LT-09105, Phone: (370-5) , Fax: (370-5) ,

VRT012 User s guide V0.1. Address: Žirmūnų g. 27, Vilnius LT-09105, Phone: (370-5) , Fax: (370-5) , VRT012 User s gude V0.1 Thank you for purchasng our product. We hope ths user-frendly devce wll be helpful n realsng your deas and brngng comfort to your lfe. Please take few mnutes to read ths manual

More information

Sorting Review. Sorting. Comparison Sorting. CSE 680 Prof. Roger Crawfis. Assumptions

Sorting Review. Sorting. Comparison Sorting. CSE 680 Prof. Roger Crawfis. Assumptions Sortng Revew Introducton to Algorthms Qucksort CSE 680 Prof. Roger Crawfs Inserton Sort T(n) = Θ(n 2 ) In-place Merge Sort T(n) = Θ(n lg(n)) Not n-place Selecton Sort (from homework) T(n) = Θ(n 2 ) In-place

More information

Constructing a Maximal Independent Set in Parallel. Mark Goldberg ( ), Thomas Spencer Department of Computer Science Rensselaer Polytechnic Institute

Constructing a Maximal Independent Set in Parallel. Mark Goldberg ( ), Thomas Spencer Department of Computer Science Rensselaer Polytechnic Institute Constructng a Maxma Independent Set n Parae Mark Godberg ( ), Thomas Spencer Department of Computer Scence Rensseaer Poytechnc Insttute ABSTRACT The probem of constructng n parae a maxma ndependent set

More information

Lecture 8: Iterators and More Mutation

Lecture 8: Iterators and More Mutation Integrated Introduction to Computer Science Fisler, Nelson Contents 1 Traversing Lists 1 2 Motivating Iterators 2 3 Writing an Iterator 3 4 Writing Sum with an Iterator 4 Objectives By the end of this

More information

Professor: Alvin Chao

Professor: Alvin Chao Professor: Avin Chao CS149 For Each and Reference Arrays Looping Over the Contents of an Array We often use a for oop to access each eement in an array: for (int i = 0; i < names.ength; i++) { System.out.printn("Heo

More information

Array transposition in CUDA shared memory

Array transposition in CUDA shared memory Array transposton n CUDA shared memory Mke Gles February 19, 2014 Abstract Ths short note s nspred by some code wrtten by Jeremy Appleyard for the transposton of data through shared memory. I had some

More information

A Binarization Algorithm specialized on Document Images and Photos

A Binarization Algorithm specialized on Document Images and Photos A Bnarzaton Algorthm specalzed on Document mages and Photos Ergna Kavalleratou Dept. of nformaton and Communcaton Systems Engneerng Unversty of the Aegean kavalleratou@aegean.gr Abstract n ths paper, a

More information

Conditional Speculative Decimal Addition*

Conditional Speculative Decimal Addition* Condtonal Speculatve Decmal Addton Alvaro Vazquez and Elsardo Antelo Dep. of Electronc and Computer Engneerng Unv. of Santago de Compostela, Span Ths work was supported n part by Xunta de Galca under grant

More information

The stream cipher MICKEY-128 (version 1) Algorithm specification issue 1.0

The stream cipher MICKEY-128 (version 1) Algorithm specification issue 1.0 The stream cpher MICKEY-128 (verson 1 Algorthm specfcaton ssue 1. Steve Babbage Vodafone Group R&D, Newbury, UK steve.babbage@vodafone.com Matthew Dodd Independent consultant matthew@mdodd.net www.mdodd.net

More information

Polyhedral Compilation Foundations

Polyhedral Compilation Foundations Polyhedral Complaton Foundatons Lous-Noël Pouchet pouchet@cse.oho-state.edu Dept. of Computer Scence and Engneerng, the Oho State Unversty Feb 8, 200 888., Class # Introducton: Polyhedral Complaton Foundatons

More information

Priority queues and heaps Professors Clark F. Olson and Carol Zander

Priority queues and heaps Professors Clark F. Olson and Carol Zander Prorty queues and eaps Professors Clark F. Olson and Carol Zander Prorty queues A common abstract data type (ADT) n computer scence s te prorty queue. As you mgt expect from te name, eac tem n te prorty

More information

A Guitar Technique Lesson with Del Casher

A Guitar Technique Lesson with Del Casher A utar Technque Lesson wth De Casher Whz ues and Rght Hand Pckng Technques by De Casher - edted by Davd Oakes Edtor s note: De has recenty vsted my webste and came away excted by what he found and wanted

More information

ELEC 377 Operating Systems. Week 6 Class 3

ELEC 377 Operating Systems. Week 6 Class 3 ELEC 377 Operatng Systems Week 6 Class 3 Last Class Memory Management Memory Pagng Pagng Structure ELEC 377 Operatng Systems Today Pagng Szes Vrtual Memory Concept Demand Pagng ELEC 377 Operatng Systems

More information

Exercises (Part 4) Introduction to R UCLA/CCPR. John Fox, February 2005

Exercises (Part 4) Introduction to R UCLA/CCPR. John Fox, February 2005 Exercses (Part 4) Introducton to R UCLA/CCPR John Fox, February 2005 1. A challengng problem: Iterated weghted least squares (IWLS) s a standard method of fttng generalzed lnear models to data. As descrbed

More information

Nkmh="y^ TurboDOS. User's Guide \.'JJ U ', -- - 'i Y. ( 1 - V? J l., e i. - - ~ 03722A

Nkmh=y^ TurboDOS. User's Guide \.'JJ U ', -- - 'i Y. ( 1 - V? J l., e i. - - ~ 03722A " 1 v. \.'JJ U ', Nkmh="y^ ( 1 - V? J., e. t ). ' Y TurboDOS User's Gude " FT - m -- - «- - - - ~ 03722A TurboDOS s a regstered trademark of Software 2000, nc. Turbo-Pus"' s a trademark of Mcroserve, nc.

More information

Overview. CSC 2400: Computer Systems. Pointers in C. Pointers - Variables that hold memory addresses - Using pointers to do call-by-reference in C

Overview. CSC 2400: Computer Systems. Pointers in C. Pointers - Variables that hold memory addresses - Using pointers to do call-by-reference in C CSC 2400: Comuter Systems Ponters n C Overvew Ponters - Varables that hold memory addresses - Usng onters to do call-by-reference n C Ponters vs. Arrays - Array names are constant onters Ponters and Strngs

More information

Nachos Project 3. Speaker: Sheng-Wei Cheng 2010/12/16

Nachos Project 3. Speaker: Sheng-Wei Cheng 2010/12/16 Nachos Project Speaker: Sheng-We Cheng //6 Agenda Motvaton User Programs n Nachos Related Nachos Code for User Programs Project Assgnment Bonus Submsson Agenda Motvaton User Programs n Nachos Related Nachos

More information

Searching & Sorting. Definitions of Search and Sort. Linear Search in C++ Linear Search. Week 11. index to the item, or -1 if not found.

Searching & Sorting. Definitions of Search and Sort. Linear Search in C++ Linear Search. Week 11. index to the item, or -1 if not found. Searchng & Sortng Wee 11 Gadds: 8, 19.6,19.8 CS 5301 Sprng 2014 Jll Seaman 1 Defntons of Search and Sort Search: fnd a gven tem n a lst, return the ndex to the tem, or -1 f not found. Sort: rearrange the

More information

(12) United States Patent Ogawa et al.

(12) United States Patent Ogawa et al. US007151027B1 (12) Unted States Patent Ogawa et al. (o) Patent No.: (45) Date of Patent: US 7,151,027 Bl Dec. 19, 2006 (54) METHOD AND DEVICE FOR REDUCING INTERFACE AREA OF A MEMORY DEVICE (75) Inventors:

More information

Loop Permutation. Loop Transformations for Parallelism & Locality. Legality of Loop Interchange. Loop Interchange (cont)

Loop Permutation. Loop Transformations for Parallelism & Locality. Legality of Loop Interchange. Loop Interchange (cont) Loop Transformatons for Parallelsm & Localty Prevously Data dependences and loops Loop transformatons Parallelzaton Loop nterchange Today Loop nterchange Loop transformatons and transformaton frameworks

More information

3D vector computer graphics

3D vector computer graphics 3D vector computer graphcs Paolo Varagnolo: freelance engneer Padova Aprl 2016 Prvate Practce ----------------------------------- 1. Introducton Vector 3D model representaton n computer graphcs requres

More information

Assembler. Shimon Schocken. Spring Elements of Computing Systems 1 Assembler (Ch. 6) Compiler. abstract interface.

Assembler. Shimon Schocken. Spring Elements of Computing Systems 1 Assembler (Ch. 6) Compiler. abstract interface. IDC Herzlya Shmon Schocken Assembler Shmon Schocken Sprng 2005 Elements of Computng Systems 1 Assembler (Ch. 6) Where we are at: Human Thought Abstract desgn Chapters 9, 12 abstract nterface H.L. Language

More information

Intro to Programming & C Why Program? 1.2 Computer Systems: Hardware and Software. Why Learn to Program?

Intro to Programming & C Why Program? 1.2 Computer Systems: Hardware and Software. Why Learn to Program? Intro to Programming & C++ Unit 1 Sections 1.1-3 and 2.1-10, 2.12-13, 2.15-17 CS 1428 Spring 2018 Ji Seaman 1.1 Why Program? Computer programmabe machine designed to foow instructions Program a set of

More information

Module Management Tool in Software Development Organizations

Module Management Tool in Software Development Organizations Journal of Computer Scence (5): 8-, 7 ISSN 59-66 7 Scence Publcatons Management Tool n Software Development Organzatons Ahmad A. Al-Rababah and Mohammad A. Al-Rababah Faculty of IT, Al-Ahlyyah Amman Unversty,

More information

Register Allocation. Consider the following assignment statement: x = (a*b)+((c*d)+(e*f)); In posfix notation: ab*cd*ef*++x

Register Allocation. Consider the following assignment statement: x = (a*b)+((c*d)+(e*f)); In posfix notation: ab*cd*ef*++x Register Aocation Consider the foowing assignment statement: x = (a*b)+((c*d)+(e*f)); In posfix notation: ab*cd*ef*++x Assume that two registers are avaiabe. Starting from the eft a compier woud generate

More information

DLK Pro the all-rounder for mobile data downloading. Tailor-made for various requirements.

DLK Pro the all-rounder for mobile data downloading. Tailor-made for various requirements. DLK Pro the all-rounder for moble data downloadng Talor-made for varous requrements www.dtco.vdo.com Smply brllant, brllantly smple Always the rght soluton The DLK Pro s the VDO product famly, whch sets

More information

Research Article Improving Streaming Capacity in Multi-Channel P2P VoD Systems via Intra-Channel and Cross-Channel Resource Allocation

Research Article Improving Streaming Capacity in Multi-Channel P2P VoD Systems via Intra-Channel and Cross-Channel Resource Allocation Internatona Journa of Dgta Mutmeda Broadcastng Voume 202, Artce ID 807520, 9 pages do:0.55/202/807520 Research Artce Improvng Streamng Capacty n Mut-Channe P2P VoD Systems va Intra-Channe and Cross-Channe

More information

Load Balancing for Hex-Cell Interconnection Network

Load Balancing for Hex-Cell Interconnection Network Int. J. Communcatons, Network and System Scences,,, - Publshed Onlne Aprl n ScRes. http://www.scrp.org/journal/jcns http://dx.do.org/./jcns.. Load Balancng for Hex-Cell Interconnecton Network Saher Manaseer,

More information

Brave New World Pseudocode Reference

Brave New World Pseudocode Reference Brave New World Pseudocode Reference Pseudocode s a way to descrbe how to accomplsh tasks usng basc steps lke those a computer mght perform. In ths week s lab, you'll see how a form of pseudocode can be

More information

Support Vector Machines for Remote-Sensing Image Classification

Support Vector Machines for Remote-Sensing Image Classification Support Vector Machnes for Remote-Sensng Image Cassfcaton Fabo Ro *, Gorgo Fumera Dept. of Eectrca and Eectronc Eng., Unversty of Cagar, Pazza d Arm, 0923, Cagar, Itay ABSTRACT In the ast decade, the appcaton

More information

Composition of UML Described Refactoring Rules *

Composition of UML Described Refactoring Rules * Composton of UML Descrbed Refactorng Rules * Slavsa Markovc Swss Federal Insttute of Technology Department of Computer Scence Software Engneerng Laboratory 05 Lausanne-EPFL Swtzerland e-mal: Slavsa.Markovc@epfl.ch

More information

Hierarchical clustering for gene expression data analysis

Hierarchical clustering for gene expression data analysis Herarchcal clusterng for gene expresson data analyss Gorgo Valentn e-mal: valentn@ds.unm.t Clusterng of Mcroarray Data. Clusterng of gene expresson profles (rows) => dscovery of co-regulated and functonally

More information

Energetic Extended Edge Finding Filtering Algorithm for Cumulative Resource Constraints

Energetic Extended Edge Finding Filtering Algorithm for Cumulative Resource Constraints Amercan Journa of Operatons Research, 201,, 589-600 Pubshed Onne November 201 (http://www.scrp.org/ourna/aor) http://dx.do.org/10.426/aor.201.6056 Energetc Extended Edge Fndng Fterng Agorthm for Cumuatve

More information

AMath 483/583 Lecture 21 May 13, Notes: Notes: Jacobi iteration. Notes: Jacobi with OpenMP coarse grain

AMath 483/583 Lecture 21 May 13, Notes: Notes: Jacobi iteration. Notes: Jacobi with OpenMP coarse grain AMath 483/583 Lecture 21 May 13, 2011 Today: OpenMP and MPI versons of Jacob teraton Gauss-Sedel and SOR teratve methods Next week: More MPI Debuggng and totalvew GPU computng Read: Class notes and references

More information

Course Introduction. Algorithm 8/31/2017. COSC 320 Advanced Data Structures and Algorithms. COSC 320 Advanced Data Structures and Algorithms

Course Introduction. Algorithm 8/31/2017. COSC 320 Advanced Data Structures and Algorithms. COSC 320 Advanced Data Structures and Algorithms Course Introducton Course Topcs Exams, abs, Proects A quc loo at a few algorthms 1 Advanced Data Structures and Algorthms Descrpton: We are gong to dscuss algorthm complexty analyss, algorthm desgn technques

More information

Intro to Programming & C Why Program? 1.2 Computer Systems: Hardware and Software. Hardware Components Illustrated

Intro to Programming & C Why Program? 1.2 Computer Systems: Hardware and Software. Hardware Components Illustrated Intro to Programming & C++ Unit 1 Sections 1.1-3 and 2.1-10, 2.12-13, 2.15-17 CS 1428 Fa 2017 Ji Seaman 1.1 Why Program? Computer programmabe machine designed to foow instructions Program instructions

More information

Harvard University CS 101 Fall 2005, Shimon Schocken. Assembler. Elements of Computing Systems 1 Assembler (Ch. 6)

Harvard University CS 101 Fall 2005, Shimon Schocken. Assembler. Elements of Computing Systems 1 Assembler (Ch. 6) Harvard Unversty CS 101 Fall 2005, Shmon Schocken Assembler Elements of Computng Systems 1 Assembler (Ch. 6) Why care about assemblers? Because Assemblers employ some nfty trcks Assemblers are the frst

More information

Fuzzy Sliding Mode Controller with Neural Network Applications to Mobile Robot

Fuzzy Sliding Mode Controller with Neural Network Applications to Mobile Robot Fuzzy Sdng Mode Controer wth Neura Network Appcatons to Mobe Robot Lon-Chen Hung and Hung-Yuan Chung* Department of Eectrca Engneerng, Natona Centra Unversty, Chung-L, Tao-Yuan, 3, Tawan, R.O.C TEL: 886-3-475

More information

High-Boost Mesh Filtering for 3-D Shape Enhancement

High-Boost Mesh Filtering for 3-D Shape Enhancement Hgh-Boost Mesh Flterng for 3-D Shape Enhancement Hrokazu Yagou Λ Alexander Belyaev y Damng We z Λ y z ; ; Shape Modelng Laboratory, Unversty of Azu, Azu-Wakamatsu 965-8580 Japan y Computer Graphcs Group,

More information

ETAtouch RESTful Webservices

ETAtouch RESTful Webservices ETAtouch RESTful Webservces Verson 1.1 November 8, 2012 Contents 1 Introducton 3 2 The resource /user/ap 6 2.1 HTTP GET................................... 6 2.2 HTTP POST..................................

More information

SLAM Summer School 2006 Practical 2: SLAM using Monocular Vision

SLAM Summer School 2006 Practical 2: SLAM using Monocular Vision SLAM Summer School 2006 Practcal 2: SLAM usng Monocular Vson Javer Cvera, Unversty of Zaragoza Andrew J. Davson, Imperal College London J.M.M Montel, Unversty of Zaragoza. josemar@unzar.es, jcvera@unzar.es,

More information

Dept. of Mathematics and Computing Science, Eindhoven University oftechnology,

Dept. of Mathematics and Computing Science, Eindhoven University oftechnology, 1 The formazaton of Message Sequence Charts S. Mauw a a Dept. of Mathematcs and Computng Scence, Endhoven Unversty oftechnoogy, P.O. Box 513, 5600 MB Endhoven, The Netherands. E-ma: sjoue@wn.tue.n We dscuss

More information

Further Concepts in Geometry

Further Concepts in Geometry ppendix F Further oncepts in Geometry F. Exporing ongruence and Simiarity Identifying ongruent Figures Identifying Simiar Figures Reading and Using Definitions ongruent Trianges assifying Trianges Identifying

More information

such that is accepted of states in , where Finite Automata Lecture 2-1: Regular Languages be an FA. A string is the transition function,

such that is accepted of states in , where Finite Automata Lecture 2-1: Regular Languages be an FA. A string is the transition function, * Lecture - Regular Languages S Lecture - Fnte Automata where A fnte automaton s a -tuple s a fnte set called the states s a fnte set called the alphabet s the transton functon s the ntal state s the set

More information

Searching, Sorting & Analysis

Searching, Sorting & Analysis Searching, Sorting & Anaysis Unit 2 Chapter 8 CS 2308 Fa 2018 Ji Seaman 1 Definitions of Search and Sort Search: find a given item in an array, return the index of the item, or -1 if not found. Sort: rearrange

More information

Outline. iterator review iterator implementation the Java foreach statement testing

Outline. iterator review iterator implementation the Java foreach statement testing Outline iterator review iterator implementation the Java foreach statement testing review: Iterator methods a Java iterator only provides two or three operations: E next(), which returns the next element,

More information

Post Operative: Six week follow-up

Post Operative: Six week follow-up Post Operatve Sx Week Follow-up - Knee Dated 9/5/ Post Operatve: Sx week follow-up Uncompartmental Knee Replacement (UKR) / Total Knee Replacement (TKR) Please complete ths booklet as soon as possble and

More information

M 20 PERsoNm COMPUTER PASCAL Language. User Guide

M 20 PERsoNm COMPUTER PASCAL Language. User Guide M 20 PERsoNm COMPUTER PASCAL Language User Gude PREFACE Ths manua s produced for programmers usng the M20 to create PASCAL anguage programs. The PASCAL anguage avaabe on the M20 s the MS-PASCAL deveoped

More information

Introduction to Programming in C Department of Computer Science and Engineering. Lecture No. #16 Loops: Matrix Using Nested for Loop

Introduction to Programming in C Department of Computer Science and Engineering. Lecture No. #16 Loops: Matrix Using Nested for Loop Introduction to Programming in C Department of Computer Science and Engineering Lecture No. #16 Loops: Matrix Using Nested for Loop In this section, we will use the, for loop to code of the matrix problem.

More information

AN ALGEBRAIC APPROACH TO CONSISTENCY CHECKING BETWEEN CLASS DIAGRAMS

AN ALGEBRAIC APPROACH TO CONSISTENCY CHECKING BETWEEN CLASS DIAGRAMS AN ALGEBRAIC AROACH TO CONSISTENC CHECKING BETWEEN CLASS DIAGRAMS HIDEKAZU ENJO, MOTONARI TANABU, JUNICHI IIJIMA NTT DATA Corporaton, okohama Natonal Unversty, Tokyo Insttute of Technology enouh@nttdata.co.p,

More information

Cache Performance 3/28/17. Agenda. Cache Abstraction and Metrics. Direct-Mapped Cache: Placement and Access

Cache Performance 3/28/17. Agenda. Cache Abstraction and Metrics. Direct-Mapped Cache: Placement and Access Agenda Cache Performance Samra Khan March 28, 217 Revew from last lecture Cache access Assocatvty Replacement Cache Performance Cache Abstracton and Metrcs Address Tag Store (s the address n the cache?

More information

l A set is a collection of objects of the same l {6,9,11,-5} and {11,9,6,-5} are equivalent. l There is no first element, and no successor of 9.

l A set is a collection of objects of the same l {6,9,11,-5} and {11,9,6,-5} are equivalent. l There is no first element, and no successor of 9. Sets & Hash Tabes Week 13 Weiss: chapter 20 CS 5301 Spring 2018 What are sets? A set is a coection of objects of the same type that has the foowing two properties: - there are no dupicates in the coection

More information

Product documentation. Issue:

Product documentation. Issue: Product documentaton Issue: 02.05.2017 Table of Contents Product documentaton 1 enet SMART HOME system... 5 1.1 System requrements... 5 1.2 Commssonng va... 5 1.3 Operaton va enet SMART HOME app... 7 2

More information

AP PHYSICS B 2008 SCORING GUIDELINES

AP PHYSICS B 2008 SCORING GUIDELINES AP PHYSICS B 2008 SCORING GUIDELINES General Notes About 2008 AP Physcs Scorng Gudelnes 1. The solutons contan the most common method of solvng the free-response questons and the allocaton of ponts for

More information

Databases and PHP. Accessing databases from PHP

Databases and PHP. Accessing databases from PHP Databases and PHP Accessing databases from PHP PHP & Databases PHP can connect to virtuay any database There are specific functions buit-into PHP to connect with some DB There is aso generic ODBC functions

More information

l A set is a collection of objects of the same l {6,9,11,-5} and {11,9,6,-5} are equivalent. l There is no first element, and no successor of 9.

l A set is a collection of objects of the same l {6,9,11,-5} and {11,9,6,-5} are equivalent. l There is no first element, and no successor of 9. Sets & Hash Tabes Week 13 Weiss: chapter 20 CS 5301 Fa 2017 What are sets? A set is a coection of objects of the same type that has the foowing two properties: - there are no dupicates in the coection

More information

NGPM -- A NSGA-II Program in Matlab

NGPM -- A NSGA-II Program in Matlab Verson 1.4 LIN Song Aerospace Structural Dynamcs Research Laboratory College of Astronautcs, Northwestern Polytechncal Unversty, Chna Emal: lsssswc@163.com 2011-07-26 Contents Contents... 1. Introducton...

More information