FitPartialCharges_GlobalError
PartialCharges_OrthogonalSummation
Last change
on this file since 346b0c was 346b0c, checked in by Frederik Heber <heber@…>, 8 years ago |
Extracted IndexedValue from IndexedVectors.
- we may now sum up indexed values of arbitrary type, i.e. an arbitrary class
that fulfills a certain interface, and each instance connected to a specific
index (within index sets).
- added detail::force where std::vector<double> is specialized for three
components.
- IndexedVectors is now a specialization of IndexedValue for detail::force.
- adapated usage signatures in AnalyseFragmentationResultsAction,
InterfaceVMGJob, and MPQCCommandJob.
- slight changes in IndexedVectorsUnitTest because boost::assign is no longer
used for detail::force.
|
-
Property mode
set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | /*
|
---|
2 | * IndexedVectors.hpp
|
---|
3 | *
|
---|
4 | * Created on: Jun 12, 2016
|
---|
5 | * Author: heber
|
---|
6 | */
|
---|
7 |
|
---|
8 |
|
---|
9 | #ifndef INDEXEDVECTORS_HPP_
|
---|
10 | #define INDEXEDVECTORS_HPP_
|
---|
11 |
|
---|
12 | // include config.h
|
---|
13 | #ifdef HAVE_CONFIG_H
|
---|
14 | #include <config.h>
|
---|
15 | #endif
|
---|
16 |
|
---|
17 | #include "Fragmentation/Summation/SetValues/detail.hpp"
|
---|
18 | #include "Fragmentation/Summation/SetValues/IndexedValue.hpp"
|
---|
19 | #include "Fragmentation/Summation/ZeroInstance.hpp"
|
---|
20 |
|
---|
21 | /** This struct is basically just a typedef for an IndexedValue with
|
---|
22 | * detail::force as the code was refactored into this more general state
|
---|
23 | * from the original IndexedVectors class.
|
---|
24 | *
|
---|
25 | * Also, we need to implement the ZeroInstance here, as nested template
|
---|
26 | * declarations a la ZeroInstance< IndexedValue<detail::force> > are
|
---|
27 | * ambiguous with ZeroInstance< detail::force >.
|
---|
28 | */
|
---|
29 | class IndexedVectors : public IndexedValue<detail::force>
|
---|
30 | {
|
---|
31 | public:
|
---|
32 | IndexedVectors(
|
---|
33 | const typename IndexedValue<detail::force>::indices_t &_indices,
|
---|
34 | const typename IndexedValue<detail::force>::values_t &_vectors) :
|
---|
35 | IndexedValue<detail::force>(_indices, _vectors)
|
---|
36 | {}
|
---|
37 |
|
---|
38 | IndexedVectors()
|
---|
39 | {}
|
---|
40 | };
|
---|
41 |
|
---|
42 | template<typename T> T ZeroInstance();
|
---|
43 | template<> IndexedVectors ZeroInstance< IndexedVectors >();
|
---|
44 | template<> detail::force ZeroInstance< detail::force >();
|
---|
45 |
|
---|
46 | #endif /* INDEXEDVECTORS_HPP_ */
|
---|
Note:
See
TracBrowser
for help on using the repository browser.