Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F61138605
myvector_template.hh
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, May 4, 19:03
Size
231 B
Mime Type
text/x-c++
Expires
Mon, May 6, 19:03 (2 d)
Engine
blob
Format
Raw Data
Handle
17470908
Attached To
R9360 PCSC_git
myvector_template.hh
View Options
// a generic Vector for any scalar type
template
<
typename
T
>
class
MyVector
{
public
:
T
&
operator
[](
unsigned
int
dim
)
{
return
value
[
dim
];
}
private
:
T
value
[
3
];
};
MyVector
<
double
>
real_vector
;
MyVector
<
int
>
integer_vector
;
Event Timeline
Log In to Comment