Biomedical Engineering Reference
In-Depth Information
public :
DATASet ( ) { e l e m e n t = " " ; }
DATASet ( s t r i n g
elem )
{ e l e m e n t
=
elem ;
}
string
outElement ()
const
{
return
element ;
}
bool
operator <(DATASet temp )
const
{
return
(element<temp. outElement ());
}
bool
operator ==(DATASet temp )
const
{
return
( element==temp. outElement ());
}
};
/
Sets
definition
/
s e t
<DATASet> DATA;
In the Java language ...
p u b l i c
s t a t i c
c l a s s
DATASet{
private
String
element ;
p u b l i c
DATASet ( )
{ e l e m e n t = " " ; }
p u b l i c
DATASet ( S t r i n g
elem )
{ e l e m e n t
=
elem ;
}
public
String
outElement ()
{
return
element ;
}
};
/
Sets
definition
/
S e t
<DATASet> DATA =
new
HashSet <DATASet > ( ) ;
In the C# language ...
p u b l i c s t a t i c c l a s s DATASet{
private string element ;
p u b l i c DATASet ( ) { e l e m e n t = " " ; }
public DATASet( string
elem)
{element = elem;
}
public
string
outElement ()
{
return
element ;
}
};
/
Sets
definition
/
H a s h S e t
<DATASet> DATA =
new
HashSet <DATASet > ( ) ;
To define a set of numbers are very simple, which can be defined as follows:
In C++ language ...
set
<int > A;
/
Sets
definition
/
In the Java language ...
Set
<Long> A=
new
HashSet <Long > ( ) ;
/
Sets
definition
/
In the Java language ...
HashSet
<int > A= new
HashSet <int >( ) ;
/
Sets
definition
/
Search WWH ::




Custom Search