-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs:
complex
character added to the "Quantity character" chapter
- Loading branch information
Showing
1 changed file
with
2 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7ea23dd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does
complex
fit into these exclusive characters?Can something not be (
scalar
andcomplex
) or(
vector
andcomplex
)?7ea23dd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not know. Do you know an example of a vector complex quantity? I need
complex
to model things likecomplex power
as mentioned in the last paragraph of my latest article.7ea23dd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A tensor could always be of vector elements.
So far, mp-units uses these for concepts and customization points,
and doesn't concern itself with the number's element, unlike its scalar.
7ea23dd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be exact,
quantity_character
specifies which operations can or can't be performed on a given quantity.7ea23dd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no dealings with these type of quantities, but they should exist.
For example, a mechanical or electrical impedance (represented as a complex-valued quantity) could be directional, so it should be possible to describe it as a vector of complex quantities.
Presumably there is also something like a complex-valued stress-strain tensor. Why not?
[real or complex]-valued
and[scalar or vector or tensor]-like
are different properties that are not mutually exclusive.7ea23dd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is a good feedback. Thank you! We need to think about how to model this. Maybe a quantity character should be a struct of enums?
7ea23dd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why isn't
complex
(not to saystd::complex<...>
) just another number type?So, belongs in a line with
byte
,integer
,float
,double
, ...7ea23dd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes and no. Complex quantities should expose additional interfaces like
real()
,imag()
andmod()
. A result of those is another specific quantity. As I wrote in my article:Also, a complex power should be created from active and reactive powers passed in that order and not the other way around.