Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
libcifpp
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
libcifpp
Commits
137ffaf7
Unverified
Commit
137ffaf7
authored
Sep 13, 2023
by
Maarten L. Hekkelman
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'github/new-docs' into develop
parents
747c6d30
4585968b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
22 deletions
+19
-22
include/cif++/pdb/io.hpp
+1
-2
include/cif++/point.hpp
+18
-20
No files found.
include/cif++/pdb/io.hpp
View file @
137ffaf7
...
@@ -29,4 +29,4 @@
...
@@ -29,4 +29,4 @@
/// \file io.hpp
/// \file io.hpp
/// \deprecated This file is no longer used. Please use "cif++/pdb.hpp" instead
/// \deprecated This file is no longer used. Please use "cif++/pdb.hpp" instead
#warning "Use of this file is deprecated, please use "cif++/pdb.hpp"
#warning "Use of this file is deprecated, please use "cif++/pdb.hpp"
\ No newline at end of file
include/cif++/point.hpp
View file @
137ffaf7
...
@@ -523,10 +523,10 @@ struct point_type
...
@@ -523,10 +523,10 @@ struct point_type
}
}
/// \brief Add the points @a lhs and @a rhs and return the result
/// \brief Add the points @a lhs and @a rhs and return the result
template
<
typename
F
1
,
typename
F
2
>
template
<
typename
F2
>
friend
constexpr
auto
operator
+
(
const
point_type
<
F1
>
&
lhs
,
const
point_type
<
F2
>
&
rhs
)
friend
constexpr
auto
operator
+
(
const
point_type
&
lhs
,
const
point_type
<
F2
>
&
rhs
)
{
{
return
point_type
<
std
::
common_type_t
<
F1
,
F2
>>
(
lhs
.
m_x
+
rhs
.
m_x
,
lhs
.
m_y
+
rhs
.
m_y
,
lhs
.
m_z
+
rhs
.
m_z
);
return
point_type
<
std
::
common_type_t
<
value_type
,
F2
>>
(
lhs
.
m_x
+
rhs
.
m_x
,
lhs
.
m_y
+
rhs
.
m_y
,
lhs
.
m_z
+
rhs
.
m_z
);
}
}
/// \brief subtract @a rhs
/// \brief subtract @a rhs
...
@@ -550,17 +550,16 @@ struct point_type
...
@@ -550,17 +550,16 @@ struct point_type
}
}
/// \brief Subtract the points @a lhs and @a rhs and return the result
/// \brief Subtract the points @a lhs and @a rhs and return the result
template
<
typename
F
1
,
typename
F
2
>
template
<
typename
F2
>
friend
constexpr
auto
operator
-
(
const
point_type
<
F1
>
&
lhs
,
const
point_type
<
F2
>
&
rhs
)
friend
constexpr
auto
operator
-
(
const
point_type
&
lhs
,
const
point_type
<
F2
>
&
rhs
)
{
{
return
point_type
<
std
::
common_type_t
<
F1
,
F2
>>
(
lhs
.
m_x
-
rhs
.
m_x
,
lhs
.
m_y
-
rhs
.
m_y
,
lhs
.
m_z
-
rhs
.
m_z
);
return
point_type
<
std
::
common_type_t
<
value_type
,
F2
>>
(
lhs
.
m_x
-
rhs
.
m_x
,
lhs
.
m_y
-
rhs
.
m_y
,
lhs
.
m_z
-
rhs
.
m_z
);
}
}
/// \brief Return the negative copy of @a pt
/// \brief Return the negative copy of @a pt
template
<
typename
F1
>
friend
constexpr
point_type
operator
-
(
const
point_type
&
pt
)
friend
constexpr
point_type
<
F1
>
operator
-
(
const
point_type
<
F1
>
&
pt
)
{
{
return
point_type
<
F
>
(
-
pt
.
m_x
,
-
pt
.
m_y
,
-
pt
.
m_z
);
return
point_type
(
-
pt
.
m_x
,
-
pt
.
m_y
,
-
pt
.
m_z
);
}
}
/// \brief multiply all members with @a rhs
/// \brief multiply all members with @a rhs
...
@@ -573,17 +572,17 @@ struct point_type
...
@@ -573,17 +572,17 @@ struct point_type
}
}
/// \brief multiply point @a pt with value @a f and return the result
/// \brief multiply point @a pt with value @a f and return the result
template
<
typename
F
1
,
typename
F
2
>
template
<
typename
F2
>
friend
constexpr
auto
operator
*
(
const
point_type
<
F1
>
&
pt
,
F2
f
)
friend
constexpr
auto
operator
*
(
const
point_type
&
pt
,
F2
f
)
{
{
return
point_type
<
std
::
common_type_t
<
F1
,
F2
>>
(
pt
.
m_x
*
f
,
pt
.
m_y
*
f
,
pt
.
m_z
*
f
);
return
point_type
<
std
::
common_type_t
<
value_type
,
F2
>>
(
pt
.
m_x
*
f
,
pt
.
m_y
*
f
,
pt
.
m_z
*
f
);
}
}
/// \brief multiply point @a pt with value @a f and return the result
/// \brief multiply point @a pt with value @a f and return the result
template
<
typename
F
1
,
typename
F
2
>
template
<
typename
F2
>
friend
constexpr
auto
operator
*
(
F
1
f
,
const
point_type
<
F2
>
&
pt
)
friend
constexpr
auto
operator
*
(
F
2
f
,
const
point_type
&
pt
)
{
{
return
point_type
<
std
::
common_type_t
<
F1
,
F2
>>
(
pt
.
m_x
*
f
,
pt
.
m_y
*
f
,
pt
.
m_z
*
f
);
return
point_type
<
std
::
common_type_t
<
value_type
,
F2
>>
(
pt
.
m_x
*
f
,
pt
.
m_y
*
f
,
pt
.
m_z
*
f
);
}
}
/// \brief divide all members by @a rhs
/// \brief divide all members by @a rhs
...
@@ -596,10 +595,10 @@ struct point_type
...
@@ -596,10 +595,10 @@ struct point_type
}
}
/// \brief divide point @a pt by value @a f and return the result
/// \brief divide point @a pt by value @a f and return the result
template
<
typename
F
1
,
typename
F
2
>
template
<
typename
F2
>
friend
constexpr
auto
operator
/
(
const
point_type
<
F1
>
&
pt
,
F2
f
)
friend
constexpr
auto
operator
/
(
const
point_type
&
pt
,
F2
f
)
{
{
return
point_type
<
std
::
common_type_t
<
F1
,
F2
>>
(
pt
.
m_x
/
f
,
pt
.
m_y
/
f
,
pt
.
m_z
/
f
);
return
point_type
<
std
::
common_type_t
<
value_type
,
F2
>>
(
pt
.
m_x
/
f
,
pt
.
m_y
/
f
,
pt
.
m_z
/
f
);
}
}
/**
/**
...
@@ -683,8 +682,7 @@ struct point_type
...
@@ -683,8 +682,7 @@ struct point_type
}
}
/// \brief Print out the point @a pt to @a os
/// \brief Print out the point @a pt to @a os
template
<
typename
F1
>
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
point_type
&
pt
)
friend
std
::
ostream
&
operator
<<
(
std
::
ostream
&
os
,
const
point_type
<
F1
>
&
pt
)
{
{
os
<<
'('
<<
pt
.
m_x
<<
','
<<
pt
.
m_y
<<
','
<<
pt
.
m_z
<<
')'
;
os
<<
'('
<<
pt
.
m_x
<<
','
<<
pt
.
m_y
<<
','
<<
pt
.
m_z
<<
')'
;
return
os
;
return
os
;
...
...
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