Qt (Generic Containers) Java STL <QtAlgorithms> STL (Generic Algorithms) QList<T>, QLinkedList<T>, QVector<T>, QStack<T>, QQueue<T> QMap<Key,

Size: px
Start display at page:

Download "Qt (Generic Containers) Java STL <QtAlgorithms> STL (Generic Algorithms) QList<T>, QLinkedList<T>, QVector<T>, QStack<T>, QQueue<T> QMap<Key,"

Transcription

1 Qt (Generic Containers) Java STL <QtAlgorithms> STL (Generic Algorithms) QList<T>, QLinkedList<T>, QVector<T>, QStack<T>, QQueue<T> QMap<Key, T>, QMultiMap<Key, T>. QHash<Key, T>, QMultiHash<Key, T> QSet<T> QList<T> T QList QList::append() QList::prepend() QList::insert() QList QLinkedList<T> QList QList QList QLinkedList QVector<T> QStack<T> QVector (LIFO) QVector push(), pop(), top() QQueue<T> QList (FIFO) QList enqueue(), dequeue(), head()

2 QMap<Key, T> Key T ( ) 1 1 QMap QHash QMultiMap<Key, T> QMap 1 QHash<Key, T> QMap API QHash QMultiHash<Key, T> QHash QSet<T> QByteArray QString QByteArray char * QString Unicode QString 16 QChar QChar Unicode QList QMap Qt QList void QList::append ( const T & value ) QList & QList::operator<< ( const T & value ) QList & QList::operator<< ( const QList & other ) append() operator<< operator<< T QList::value ( int i ) const T QList::value ( int i, const T & defaultvalue ) const i i i at() T & QList::operator[] ( int i )

3 5.2 3 const T & QList::operator[] ( int i ) const const T & QList::at ( int i ) const i i (0 <= i < size()) int QList::size () const bool QList::isEmpty () const void QList::clear () size() 1 isempty() clear() QDataStream & operator<< ( QDataStream & out, const QList<T> & list ) QDataStream & operator>> ( QDataStream & in, QList<T> & list QMap iterator QMap::insert ( const Key & key, const T & value ) iterator QMap::insertMulti ( const Key & key, const T & value ) key value insert() *1 insertmulti() iterator STL const T QMap::value ( const Key & key ) const const T QMap::value ( const Key & key, const T & defaultvalue ) const T & QMap::operator[] ( const Key & key ) const T QMap::operator[] ( const Key & key ) const values() int QMap::size () const bool QMap::isEmpty () const void QMap::clear () size() isempty() 1 clear() *1 insertmulti()

4 4 5 QDataStream & operator<< ( QDataStream & out, const QMap<Key, T> & map ) QDataStream & operator>> ( QDataStream & in, QMap<Key, T> & map ) QList<Key> QMap::keys () const QList<Key> QMap::keys ( const T & value ) const QList<T> QMap::values () const QList<T> QMap::values ( const Key & key ) const keys() QList<Key> values() QList<T> insertmulti() 5.3 Qt QList<T> O(1) O(n) O(log n) O(log n) QLinkedList<T> O(n) O(1) O(1) O(1) QVector<T> O(1) O(n) O(n) O(log n) QMap<Key, T> O(log n) O(log n) O(log n) O(log n) QHash<Key, T> O(1) O(n) O(log n) O(n) QSet<Key> O(1) O(n) O(log n) O(n) 5.2

5 5.4 Java Java Qt 4 Java Java Qt STL QList<T>, QQueue<T> QListIterator<T> QMutableListIterator<T> QLinkedList<T> QLinkedListIterator<T> QMutableLinkedListIterator<T> QVector<T>, QStack<T> QVectorIterator<T> QMutableVectorIterator<T> QSet<T> QSetIterator<T> N/A QMap<Key, T>, QMultiMap<Key, T> QMapIterator<Key, T> QMutableMapIterator<Key, T> QHash<Key, T>, QMultiHash<Key, T> QHashIterator<Key, T> QMutableHashIterator<Key, T> 5.3 Java Java next() previous() QListIterator QList<T>, QLinkedList<T>, QVector<T>, QSet<T> QListIterator const T & QListIterator::next () const T & QListIterator::previous () void QListIterator::toFront () ( ) void QListIterator::toBack ()

6 6 5 ( ) bool QListIterator::hasNext () const bool QListIterator::hasPrevious () const const T & QListIterator::peekNext () const const T & QListIterator::peekPrevious () const bool QListIterator::findNext ( const T & value ) bool QListIterator::findPrevious ( const T & value ) QListIterator 1 #include <QtCore> 2 3 int main(int argc, char *argv[]) 4 { 5 QList<int> list; 6 list << 1 << 2 << 3; 7 8 QListIterator<int> i(list); 9 i.tofront(); // 10 while (i.hasnext()) { 11 qdebug() << i.next(); 12 }

7 5.4 Java i.toback(); 15 while (i.hasprevious()) { 16 qdebug() << i.previous(); 17 } return 0; 20 } 5,6 int STL QMutableListIterator QListIterator QMutableListIterator QMutableListIterator QListIterator void QMutableListIterator::remove () void QMutableListIterator::setValue ( const T & value ) const 100 remove(). 1 QMutableListIterator<int> i(list); 2 3 while(i.hasnext()){ 4 if(qabs<int>(i.next()) >= 100){ 5 i.remove(); 6 } 7 } while(i.hasnext()){ 2 i.setvalue(qbound<int>(-99, i.next(), 99)); 3 }

8 QMapIterator QMapIterator QListIterator next(), previous(), tofront(), toback(), hasnext(), hasprevious(), peeknext(), peekprevious(), findnext(), findprevious() next(), previous(), peeknext(), peekprevious() key() value() QMap<T> QHash<T> QMapIterator QMap 1 #include <QtCore> 2 3 int main(int argc, char *argv[]) 4 { 5 QMap<QString, QString> map; 6 map.insert("japan", QString::fromLocal8Bit(" ")); 7 map.insert("norway", QString::fromLocal8Bit(" ")); 8 9 QMapIterator<QString, QString> i(map); 10 while (i.hasnext()) { 11 qdebug() << i.peeknext().key() << i.peeknext().value(); 12 i.next(); 13 } return 0; 16 } while(i.hasnext()){ QMap<QString, QString>::const_iterator ci = i.next(); qdebug() << ci.key() << ci.value(); } while(i.hasnext()){ qdebug() << i.peeknext().key() << i.next().value(); // } C++ peeknext() next()

9 5.5 STL QMutableMapIterator QMutableListIterator QListIterator QMutableMapIterator QMapIterator remove(), setvalue() 1 #include <QtCore> 2 3 int main(int argc, char *argv[]) 4 { 5 QMap<QString, QString> map; 6 map.insert("japan", "Tokyo"); 7 map.insert("norway", "Oslo"); 8 9 QMutableMapIterator<QString, QString> i(map); 10 while (i.hasnext()) { 11 i.setvalue(i.next().value().toupper()); 12 qdebug() << i.peekprevious().value(); 13 } return 0; 16 } 5.5 STL Qt Java STL STL Java Qt STL STL

10 10 5 QList<T>, QQueue<T> QList<T>::const_iterator QList<T>::iterator QLinkedList<T> QLinkedList<T>::const_iterator QLinkedList<T>::iterator QVector<T>, QStack<T> QVector<T>::const_iterator QVector<T>::iterator QSet<T> QSet<T>::const_iterator N/A QMap<Key, T>, QMultiMap<Key, T> QMap<Key, T>::const_iterator QMap<Key, T>::iterator QHash<Key, T>, QMultiHash<Key, T> QHash<Key, T>::const_iterator QHash<Key, T>::iterator 5.4 STL Java STL begin() end() *2 end() STL ++ * QList::const_iterator 1 #include <QtCore> 2 3 int main(int argc, char *argv[]) 4 { 5 QList<int> list; 6 list << 1 << 2 << 3; 7 8 QList<int>::const_iterator i; 9 i = list.begin(); 10 while (i!= list.end()) { 11 qdebug() << *i++; 12 } i = list.end(); 15 while (i!= list.begin()) { 16 qdebug() << *--i; 17 } *2 past-the-end [begin, end) begin end

11 5.6 foreach return 0; 20 } 5.6 foreach foreach Qt C++ Qt C++ foreach foreach (variable, container) statement; foreach QList<int> 1 #include <QtCore> 2 3 int main(int argc, char *argv[]) 4 { 5 QList<int> list; 6 list << 300 << 400 << 250 << 600; 7 8 int sum = 0; 9 foreach (int n, list) { 10 sum += n; 11 } 12 qdebug("sum: %d", sum); return 0; 15 } keys() foreach 1 #include <QtCore> 2 3 int main(int argc, char *argv[]) 4 { 5 QMap<QString, QString> map; 6 map.insert("japan", QString::fromLocal8Bit(" ")); 7 map.insert("norway", QString::fromLocal8Bit(" ")); 8 9 foreach (QString s, map.keys()) {

12 qdebug() << s << map.value(s); 11 } return 0; 14 } 5.7 Qt <QtAlgorithms> Qt STL <algorithm> <QtAlgorithms> STL <algorithm> STL STL STL 5 STL 5 2 ==!= * ++ Qt * ++ Qt const Qt const -- Qt const

13 i += n i -= n i + n n + i i - n i - j i[n] i < j i n i n i n i n i j *(i + n) j i QList, QLinkedList, QVector const <QtAlgorithm> InputIterator OutputIterator ForwardIterator BiIterator RandomAccessIterator InputIterator qfind ( InputIterator begin, InputIterator end, const T & value ) [begin, end) value value end RandomAccessIterator qbinaryfind ( RandomAccessIterator begin, RandomAccessIterator end, const T & value ) RandomAccessIterator qlowerbound ( RandomAccessIterator begin, RandomAccessIterator end, const T & value ) RandomAccessIterator qupperbound ( RandomAccessIterator begin, RandomAccessIterator end, const T & value ) [begin, end) value value end [begin, end) qbinaryfind() qlowerbound() qupperbound() value void qsort ( BiIterator begin, BiIterator end ) void qsort ( BiIterator begin, BiIterator end, LessThan lessthan )

14 14 5 void qsort ( Container & container ) void qstablesort ( BiIterator begin, BiIterator end ) void qstablesort ( BiIterator begin, BiIterator end, LessThan lessthan ) void qstablesort ( Container & container ) qsort() [begin, end) lessthan operator<() container qsort(container.begin(), container.end()) qstablesort() qsort() 1 class caseinsensitivelessthan 2 { 3 public: 4 inline bool operator()(const QString &s1, const QString &s2) const 5 { 6 return s1.tolower() < s2.tolower(); 7 } 8 }; QList<QString> list; 11 list << "alpha" << "BETA" << "gamma" << "DELTA"; 12 qsort(list.begin(), list.end(), caseinsensitivelessthan()); qgreater<t>() qgreater<t>() <QtAlgorithm> 12 qsort(list.begin(), list.end(), qgreater<qstring>()); STL <functional> STL 12 qsort(list.begin(), list.end(), std::greater<qstring>()); OutputIterator qcopy ( InputIterator begin1, InputIterator end1, OutputIterator begin2 ) BiIterator2 qcopybackward ( BiIterator1 begin1, BiIterator1 end1, BiIterator2 end2 ) qcopy() [begin1, end1) [begin2,...) qcopybackward() [begin1, end1) [..., end2) bool qequal ( InputIterator1 begin1, InputIterator1 end1, InputIterator2 begin2 ) [begin1, end1) [begin2,...)

15 void qcount ( InputIterator begin, InputIterator end, const T & value, Size & n ) [begin, end) value n void qfill ( ForwardIterator begin, ForwardIterator end, const T & value ) [begin, end) value void qdeleteall ( ForwardIterator begin, ForwardIterator end ) void qdeleteall ( const Container & container ) [begin, end) C++ delete container qdeleteall(container.begin(), container.end()) void qswap ( T & var1, T & var2 ) var1 var Qt Qt (Implicit Data Sharing) Qt delete qdeleteall() clear() 1 #include <QtCore> 2 3 int main(void) 4 { 5 QList<QString*> list; 6 list.append(new QString("alpha")); 7 list.append(new QString("beta")); 8 list.append(new QString("gamma")); 9 10 QListIterator<QString*> i(list); 11 while (i.hasnext()) { 12 qdebug() << *i.next();

16 } qdeleteall(list); // 16 list.clear(); // i return 0; 19 } Qt QBitArray QBitmap QBrush QByteArray QCursor QDir QDomImplementation QDomNodeList QDomNode QDomNamedNodeMap QFileInfo QFont QFontInfo QFontMetrics QFontMetricsF QGLColormap QHash QIcon QImage QKeySequence QLinkedList QList QLocale QMap QMovie QMultiHash QMultiMap QPalette QPen QPicture QPixmap QPointArray QQueue QRegExp QRegion QSqlField QSqlQuery QSqlRecord QStack QString QStringList QTextCursor QTextDocumentFragment QTextFormat QUrl QVariant QVector QX11Info 1 0 (shallow copy) (deep copy) 1 QString s1, s2;

17 s1 = "hello, "; // 1 3 s2 = s1; // s2.append("world."); // 1 CPU : STL QList<T>, QByteArray, QString ( Qt ) 1. IP32 *3 QList<T> 20 QByteArray QString a , 32, 40, 48, 56, 64 b , 128, 256, 512, 1024, 2048, 4096 c , 8192, 12288, 16384, 20480, 24576, 28672,... QVector<T> memcpy() 1.5 QHash<T> 2 QVector<T>, QHash<Key, T>, QSet<T>, QString, QByteArray 3 capacity() (QHash QSet ) *3 IP32 int 32

18 18 5 reserve(size) size squeeze() reserve() squeeze()

(STL) STL 1 (deta structure) (algorithm) (deta structure) 2 STL STL (Standard Template Library) 2.1 STL STL ( ) vector<int> x; for(int i = 0; i < 10;

(STL) STL 1 (deta structure) (algorithm) (deta structure) 2 STL STL (Standard Template Library) 2.1 STL STL ( ) vector<int> x; for(int i = 0; i < 10; (STL) STL 1 (deta structure) (algorithm) (deta structure) 2 STL STL (Standard Template Library) 2.1 STL STL ( ) vector x; for(int i = 0; i < 10; ++i) x.push_back(i); vector STL x.push_back(i) STL

More information

1.3 ( ) ( ) C

1.3 ( ) ( ) C 1 1.1 (Data Base) (Container) C++ Java 1.2 1 1.3 ( ) ( ) 1. 2. 3. C++ 2 2.1 2.2 2.3 2 C Fortran C++ Java 3 3.1 (Vector) 1. 2. ( ) 3.2 3 3.3 C++ C++ STL C++ (Template) vector vector< > ; int arrayint vector

More information

r07.dvi

r07.dvi 19 7 ( ) 2019.4.20 1 1.1 (data structure ( (dynamic data structure 1 malloc C free C (garbage collection GC C GC(conservative GC 2 1.2 data next p 3 5 7 9 p 3 5 7 9 p 3 5 7 9 1 1: (single linked list 1

More information

ohp07.dvi

ohp07.dvi 19 7 ( ) 2019.4.20 1 (data structure) ( ) (dynamic data structure) 1 malloc C free 1 (static data structure) 2 (2) C (garbage collection GC) C GC(conservative GC) 2 2 conservative GC 3 data next p 3 5

More information

joho07-1.ppt

joho07-1.ppt 0xbffffc5c 0xbffffc60 xxxxxxxx xxxxxxxx 00001010 00000000 00000000 00000000 01100011 00000000 00000000 00000000 xxxxxxxx x y 2 func1 func2 double func1(double y) { y = y + 5.0; return y; } double func2(double*

More information

C言語によるアルゴリズムとデータ構造

C言語によるアルゴリズムとデータ構造 Algorithms and Data Structures in C 4 algorithm List - /* */ #include List - int main(void) { int a, b, c; int max; /* */ Ÿ 3Ÿ 2Ÿ 3 printf(""); printf(""); printf(""); scanf("%d", &a); scanf("%d",

More information

ohp03.dvi

ohp03.dvi 19 3 ( ) 2019.4.20 CS 1 (comand line arguments) Unix./a.out aa bbb ccc ( ) C main void int main(int argc, char *argv[]) {... 2 (2) argc argv argc ( ) argv (C char ) ( 1) argc 4 argv NULL. / a. o u t \0

More information

cpp1.dvi

cpp1.dvi 2017 c 1 C++ (1) C C++, C++, C 11, 12 13 (1) 14 (2) 11 1 n C++ //, [List 11] 1: #include // C 2: 3: int main(void) { 4: std::cout

More information

r08.dvi

r08.dvi 19 8 ( ) 019.4.0 1 1.1 (linked list) ( ) next ( 1) (head) (tail) ( ) top head tail head data next 1: NULL nil ( ) NULL ( NULL ) ( 1 ) (double linked list ) ( ) 1 next 1 prev 1 head cur tail head cur prev

More information

r03.dvi

r03.dvi 19 ( ) 019.4.0 CS 1 (comand line arguments) Unix./a.out aa bbb ccc ( ) C main void... argc argv argc ( ) argv (C char ) ( 1) argc 4 argv NULL. / a. o u t \0 a a \0 b b b \0 c c c \0 1: // argdemo1.c ---

More information

一般演題(ポスター)

一般演題(ポスター) 6 5 13 : 00 14 : 00 A μ 13 : 00 14 : 00 A β β β 13 : 00 14 : 00 A 13 : 00 14 : 00 A 13 : 00 14 : 00 A β 13 : 00 14 : 00 A β 13 : 00 14 : 00 A 13 : 00 14 : 00 A β 13 : 00 14 : 00 A 13 : 00 14 : 00 A

More information

programmingII2019-v01

programmingII2019-v01 II 2019 2Q A 6/11 6/18 6/25 7/2 7/9 7/16 7/23 B 6/12 6/19 6/24 7/3 7/10 7/17 7/24 x = 0 dv(t) dt = g Z t2 t 1 dv(t) dt dt = Z t2 t 1 gdt g v(t 2 ) = v(t 1 ) + g(t 2 t 1 ) v v(t) x g(t 2 t 1 ) t 1 t 2

More information

ALG2012-A.ppt

ALG2012-A.ppt 21279 ([email protected]) http://www.info.kochi-tech.ac.jp/k1sakai/lecture/alg/212/index.html (, )ε m = n C2 = n ( n 1) / 2 m = n ( n 1) 1 11 11 111 11 111 111 1111 1 1 11 1 11 11 111 4-dimentional

More information

untitled

untitled C -1 - -2 - concept lecture keywords FILE, fopen, fclose, fscanf, fprintf, EOF, r w a, typedef gifts.dat Yt JZK-3 Jizake tsumeawase 45 BSP-15 Body soap set 3 BT-2 Bath towel set 25 TEA-2 Koutya

More information

untitled

untitled 21174 ([email protected]) http://www.info.kochi-tech.ac.jp/k1sakai/lecture/alg/211/index.html tech.ac.jp/k1sakai/lecture/alg/211/index.html html (, )ε m = n C2 = n ( n 1) / 2 m = n ( ( n

More information

tuat1.dvi

tuat1.dvi ( 1 ) http://ist.ksc.kwansei.ac.jp/ tutimura/ 2012 6 23 ( 1 ) 1 / 58 C ( 1 ) 2 / 58 2008 9 2002 2005 T E X ptetex3, ptexlive pt E X UTF-8 xdvi-jp 3 ( 1 ) 3 / 58 ( 1 ) 4 / 58 C,... ( 1 ) 5 / 58 6/23( )

More information

SystemC言語概論

SystemC言語概論 SystemC CPU S/W 2004/01/29 4 SystemC 1 SystemC 2.0.1 CPU S/W 3 ISS SystemC Co-Simulation 2004/01/29 4 SystemC 2 ISS SystemC Co-Simulation GenericCPU_Base ( ) GenericCPU_ISS GenericCPU_Prog GenericCPU_CoSim

More information

yacc.dvi

yacc.dvi 2017 c 8 Yacc Mini-C C/C++, yacc, Mini-C, run,, Mini-C 81 Yacc Yacc, 1, 2 ( ), while ::= "while" "(" ")" while yacc 1: st while : lex KW WHILE lex LPAREN expression lex RPAREN statement 2: 3: $$ = new

More information

ex01.dvi

ex01.dvi ,. 0. 0.0. C () /******************************* * $Id: ex_0_0.c,v.2 2006-04-0 3:37:00+09 naito Exp $ * * 0. 0.0 *******************************/ #include int main(int argc, char **argv) { double

More information

cpp4.dvi

cpp4.dvi 2017 c 4 C++ (4) C++, 41, 42, 1, 43,, 44 45, 41 (inheritance),, C++,, 100, 50, PCMCIA,,,,,,,,, 42 1 421 ( ), car 1 [List 41] 1: class car { 2: private: 3: std::string m model; // 4: std::string m maker;

More information

1.ppt

1.ppt /* * Program name: hello.c */ #include int main() { printf( hello, world\n ); return 0; /* * Program name: Hello.java */ import java.io.*; class Hello { public static void main(string[] arg)

More information

/ SCHEDULE /06/07(Tue) / Basic of Programming /06/09(Thu) / Fundamental structures /06/14(Tue) / Memory Management /06/1

/ SCHEDULE /06/07(Tue) / Basic of Programming /06/09(Thu) / Fundamental structures /06/14(Tue) / Memory Management /06/1 I117 II I117 PROGRAMMING PRACTICE II 2 MEMORY MANAGEMENT 2 Research Center for Advanced Computing Infrastructure (RCACI) / Yasuhiro Ohara [email protected] / SCHEDULE 1. 2011/06/07(Tue) / Basic of Programming

More information

Condition DAQ condition condition 2 3 XML key value

Condition DAQ condition condition 2 3 XML key value Condition DAQ condition 2009 6 10 2009 7 2 2009 7 3 2010 8 3 1 2 2 condition 2 3 XML key value 3 4 4 4.1............................. 5 4.2...................... 5 5 6 6 Makefile 7 7 9 7.1 Condition.h.............................

More information

新版明解C言語 実践編

新版明解C言語 実践編 2 List - "max.h" a, b max List - max "max.h" #define max(a, b) ((a) > (b)? (a) : (b)) max List -2 List -2 max #include "max.h" int x, y; printf("x"); printf("y"); scanf("%d", &x); scanf("%d", &y); printf("max(x,

More information

SystemC 2.0を用いた簡易CPUバスモデルの設計

SystemC 2.0を用いた簡易CPUバスモデルの設計 SystemC 2.0 CPU CPU CTD&SW CT-PF 2002/1/23 1 CPU BCA UTF GenericCPU IO (sc_main) 2002/1/23 2 CPU CPU CQ 1997 11 Page 207 4 Perl Verilog-HDL CPU / Verilog-HDL SystemC 2.0 (asm) ROM (test.hex) 2002/1/23

More information

program.dvi

program.dvi 2001.06.19 1 programming semi ver.1.0 2001.06.19 1 GA SA 2 A 2.1 valuename = value value name = valuename # ; Fig. 1 #-----GA parameter popsize = 200 mutation rate = 0.01 crossover rate = 1.0 generation

More information

日本糖尿病学会誌第58巻第3号

日本糖尿病学会誌第58巻第3号 l l μ l l l l l μ l l l l μ l l l l μ l l l l l l l l l l l l l μ l l l l μ Δ l l l μ Δ μ l l l l μ l l μ l l l l l l l l μ l l l l l μ l l l l l l l l μ l μ l l l l l l l l l l l l μ l l l l β l l l μ

More information

ex01.dvi

ex01.dvi ,. 0. 0.0. C () /******************************* * $Id: ex_0_0.c,v.2 2006-04-0 3:37:00+09 naito Exp $ * * 0. 0.0 *******************************/ #include int main(int argc, char **argv) double

More information

£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (2018) - Â裶²ó ¨¡ À©¸æ¹½Â¤¡§·«¤êÊÖ¤· ¨¡

£Ã¥×¥í¥°¥é¥ß¥ó¥°ÆþÌç (2018) - Â裶²ó  ¨¡ À©¸æ¹½Â¤¡§·«¤êÊÖ¤· ¨¡ (2018) 2018 5 24 ( ) while ( ) do while ( ); for ( ; ; ) while int i = 0; while (i < 100) { printf("i = %3d\n", i); i++; while int i = 0; i while (i < 100) { printf("i = %3d\n", i); i++; while int i =

More information

受賞講演要旨2012cs3

受賞講演要旨2012cs3 アハ ート アハ ート アハ ート アハ ート アハ ート アハ ート アハ ート アハ ート アハ ート アハ ート アハ ート アハ ート アハ ート アハ ート アハ ート アハ ート アハ ート アハ ート アハ ート アハ ート アハ ート アハ ート アハ ート アハ ート アハ ート アハ ート アハ ート アハ ート アハ ート アハ ート アハ ート α β α α α α α

More information

BW BW

BW BW Induced Sorting BW 11T2042B 2015 3 23 1 1 1.1................................ 1 1.2................................... 1 2 BW 1 2.1..................................... 2 2.2 BW.................................

More information

日本糖尿病学会誌第58巻第2号

日本糖尿病学会誌第58巻第2号 β γ Δ Δ β β β l l l l μ l l μ l l l l α l l l ω l Δ l l Δ Δ l l l l l l l l l l l l l l α α α α l l l l l l l l l l l μ l l μ l μ l l μ l l μ l l l μ l l l l l l l μ l β l l μ l l l l α l l μ l l

More information

memo

memo 数理情報工学演習第一 C プログラミング演習 ( 第 5 回 ) 2015/05/11 DEPARTMENT OF MATHEMATICAL INFORMATICS 1 今日の内容 : プロトタイプ宣言 ヘッダーファイル, プログラムの分割 課題 : 疎行列 2 プロトタイプ宣言 3 C 言語では, 関数や変数は使用する前 ( ソースの上のほう ) に定義されている必要がある. double sub(int

More information

RHEA key

RHEA key 2 P (k, )= k e k! 3 4 Probability 0.4 0.35 0.3 0.25 Poisson ( λ = 1) Poisson (λ = 3) Poisson ( λ = 10) Poisson (λ = 20) Poisson ( λ = 30) Gaussian (µ = 1, s = 1) Gaussian ( µ = 3, s = 3) Gaussian (µ =

More information

アルゴリズムとデータ構造1

アルゴリズムとデータ構造1 1 2007 6 26 26 (sakai.keiichi@kochi [email protected]) http://www.info.kochi-tech.ac.jp/k1sakai/lecture/alg/2007/index.html tech.ac.jp/k1sakai/lecture/alg/2007/index.html FIFO (46 ) head,

More information

文字列操作と正規表現

文字列操作と正規表現 文字列操作と正規表現 オブジェクト指向プログラミング特論 2018 年度只木進一 : 工学系研究科 2 文字列と文字列クラス 0 個以上の長さの文字の列 Java では String クラス 操作 文字列を作る 連結する 文字列中に文字列を探す 文字列中の文字列を置き換える 部分文字列を得る 3 String クラス 文字列を保持するクラス 文字列は定数であることに注意 比較に注意 == : オブジェクトとしての同等性

More information

- - http://168iroha.net 018 10 14 i 1 1 1.1.................................................... 1 1.................................................... 7.1................................................

More information

Microsoft Word - Cプログラミング演習(12)

Microsoft Word - Cプログラミング演習(12) 第 12 回 (7/9) 4. いくつかのトピック (5)main 関数の引数を利用したファイル処理 main 関数は, 起動する環境から引数を受け取ることができる 例えば 次に示すように,main 関数に引数を用いたプログラムを作成する 01 /* sample */ 02 /* main 関数の引数 */ 03 #include 04 05 main(int argc, char

More information

コーディング基準.PDF

コーディング基準.PDF Java Java Java Java.java.class 1 private public package import / //////////////////////////////////////////////////////////////////////////////// // // // // ////////////////////////////////////////////////////////////////////////////////

More information

新・明解C言語 実践編

新・明解C言語 実践編 第 1 章 見 21 1-1 見えないエラー 見 List 1-1 "max2x1.h" a, b max2 List 1-1 chap01/max2x1.h max2 "max2x1.h" #define max2(a, b) ((a) > (b)? (a) : (b)) max2 List 1-2 List 1-2 chap01/max2x1test.c max2 #include

More information

untitled

untitled II 4 Yacc Lex 2005 : 0 1 Yacc 20 Lex 1 20 traverse 1 %% 2 [0-9]+ { yylval.val = atoi((char*)yytext); return NUM; 3 "+" { return + ; 4 "*" { return * ; 5 "-" { return - ; 6 "/" { return / ; 7 [ \t] { /*

More information

£Ã¥×¥í¥°¥é¥ß¥ó¥°(2018) - Âè11²ó – ½ÉÂꣲ¤Î²òÀ⡤±é½¬£² –

£Ã¥×¥í¥°¥é¥ß¥ó¥°(2018) - Âè11²ó – ½ÉÂꣲ¤Î²òÀ⡤±é½¬£² – (2018) 11 2018 12 13 2 g v dv x dt = bv x, dv y dt = g bv y (1) b v 0 θ x(t) = v 0 cos θ ( 1 e bt) (2) b y(t) = 1 ( v 0 sin θ + g ) ( 1 e bt) g b b b t (3) 11 ( ) p14 2 1 y 4 t m y > 0 y < 0 t m1 h = 0001

More information

10/ / /30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20 6. http, CGI Perl 11/27 7. ( ) Perl 12/ 4 8. Windows Winsock 12/11 9. JAV

10/ / /30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20 6. http, CGI Perl 11/27 7. ( ) Perl 12/ 4 8. Windows Winsock 12/11 9. JAV [email protected] [email protected] http://www.misojiro.t.u-tokyo.ac.jp/ tutimura/sem3/ 2002 12 11 p.1/33 10/16 1. 10/23 2. 10/30 3. ( ) 11/ 6 4. UNIX + C socket 11/13 5. ( ) C 11/20

More information

WinHPC ppt

WinHPC ppt MPI.NET C# 2 2009 1 20 MPI.NET MPI.NET C# MPI.NET C# MPI MPI.NET 1 1 MPI.NET C# Hello World MPI.NET.NET Framework.NET C# API C# Microsoft.NET java.net (Visual Basic.NET Visual C++) C# class Helloworld

More information

class IntCell { private int value ; int getvalue() {return value; private IntCell next; IntCell next() {return next; IntCell(int value) {this.value =

class IntCell { private int value ; int getvalue() {return value; private IntCell next; IntCell next() {return next; IntCell(int value) {this.value = Part2-1-3 Java (*) (*).class Java public static final 1 class IntCell { private int value ; int getvalue() {return value; private IntCell next; IntCell next() {return next; IntCell(int value) {this.value

More information

2 T 1 N n T n α = T 1 nt n (1) α = 1 100% OpenMP MPI OpenMP OpenMP MPI (Message Passing Interface) MPI MPICH OpenMPI 1 OpenMP MPI MPI (trivial p

2 T 1 N n T n α = T 1 nt n (1) α = 1 100% OpenMP MPI OpenMP OpenMP MPI (Message Passing Interface) MPI MPICH OpenMPI 1 OpenMP MPI MPI (trivial p 22 6 22 MPI MPI 1 1 2 2 3 MPI 3 4 7 4.1.................................. 7 4.2 ( )................................ 10 4.3 (Allreduce )................................. 12 5 14 5.1........................................

More information

第86回日本感染症学会総会学術集会後抄録(II)

第86回日本感染症学会総会学術集会後抄録(II) χ μ μ μ μ β β μ μ μ μ β μ μ μ β β β α β β β λ Ι β μ μ β Δ Δ Δ Δ Δ μ μ α φ φ φ α γ φ φ γ φ φ γ γδ φ γδ γ φ φ φ φ φ φ φ φ φ φ φ φ φ α γ γ γ α α α α α γ γ γ γ γ γ γ α γ α γ γ μ μ κ κ α α α β α

More information

第89回日本感染症学会学術講演会後抄録(I)

第89回日本感染症学会学術講演会後抄録(I) ! ! ! β !!!!!!!!!!! !!! !!! μ! μ! !!! β! β !! β! β β μ! μ! μ! μ! β β β β β β μ! μ! μ!! β ! β ! ! β β ! !! ! !!! ! ! ! β! !!!!! !! !!!!!!!!! μ! β !!!! β β! !!!!!!!!! !! β β β β β β β β !!

More information

±é½¬£²¡§£Í£Ð£É½éÊâ

±é½¬£²¡§£Í£Ð£É½éÊâ 2012 8 7 1 / 52 MPI Hello World I ( ) Hello World II ( ) I ( ) II ( ) ( sendrecv) π ( ) MPI fortran C wget http://www.na.scitec.kobe-u.ac.jp/ yaguchi/riken2012/enshu2.zip unzip enshu2.zip 2 / 52 FORTRAN

More information