Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
ab6ee71a
Commit
ab6ee71a
authored
Dec 02, 2009
by
Mathias Goldau
Browse files
[STYLE
#183
] WDataSetFibers inline code removed
parent
22b78f84
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
13 deletions
+23
-13
src/dataHandler/WDataSetFibers.cpp
src/dataHandler/WDataSetFibers.cpp
+20
-0
src/dataHandler/WDataSetFibers.h
src/dataHandler/WDataSetFibers.h
+3
-13
No files found.
src/dataHandler/WDataSetFibers.cpp
View file @
ab6ee71a
...
...
@@ -46,3 +46,23 @@ void WDataSetFibers::erase( const std::vector< bool > &unused )
}
m_fibers
->
erase
(
useable
,
m_fibers
->
end
()
);
}
WDataSetFibers
::
WDataSetFibers
(
boost
::
shared_ptr
<
std
::
vector
<
wmath
::
WFiber
>
>
fibs
)
:
m_fibers
(
fibs
)
{
}
size_t
WDataSetFibers
::
size
()
const
{
return
m_fibers
->
size
();
}
const
wmath
::
WFiber
&
WDataSetFibers
::
operator
[](
const
size_t
index
)
const
{
assert
(
index
<
m_fibers
->
size
()
);
return
(
*
m_fibers
)[
index
];
}
src/dataHandler/WDataSetFibers.h
View file @
ab6ee71a
...
...
@@ -41,26 +41,17 @@ public:
/**
* Constructs a new set of WFibers
*/
explicit
WDataSetFibers
(
boost
::
shared_ptr
<
std
::
vector
<
wmath
::
WFiber
>
>
fibs
)
:
m_fibers
(
fibs
)
{
}
explicit
WDataSetFibers
(
boost
::
shared_ptr
<
std
::
vector
<
wmath
::
WFiber
>
>
fibs
);
/**
* Get number of fibers in this data set.
*/
inline
size_t
size
()
const
{
return
m_fibers
->
size
();
}
size_t
size
()
const
;
/**
* \return The i'th fiber.
*/
inline
const
wmath
::
WFiber
&
operator
[](
const
size_t
index
)
const
{
assert
(
index
<
m_fibers
->
size
()
);
return
(
*
m_fibers
)[
index
];
}
const
wmath
::
WFiber
&
operator
[](
const
size_t
index
)
const
;
/**
* Sort fibers descending on their length.
...
...
@@ -74,7 +65,6 @@ public:
void
erase
(
const
std
::
vector
<
bool
>
&
unused
);
protected:
private:
boost
::
shared_ptr
<
std
::
vector
<
wmath
::
WFiber
>
>
m_fibers
;
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment