text:
# B Need help with gravitational acceleration SI units

Tags:
1. Jul 7, 2017

### icandothemath

Please ignore strikeout (not sure why post is doing that)
I just watched a video from Caltech (Video link at bottom of post)
It says:
Displacement = Distance Fallen in first second of time in [m] * Time2
so Time2 has no si unit as it is just a ratio right?

Instant or Average Velocity = 2 * Distance Fallen in first second of time[m] * Initial Time[sec] - Distance Fallen in first second of time[m] * Change in Time[sec]
velocity should have the si unit m/s but I am getting m*s (What am I doing wrong?)

Instant or Average Acceleration = 2 * Distance Fallen in first second of time[m] * (Initial Time[sec] + Change in Time[sec])
units should be m/s2 but I am getting m*s (What am I doing wrong?)

Gravitational Acceleration = 2 * Distance Fallen in first second of time[m]
units should be m/s[SUP]2[/SUP] but I am getting m (What am I doing wrong?)

Last edited: Jul 7, 2017
2. Jul 7, 2017

### pixel

Since this is a 28 minute video, can you tell us the time that this statement appears. The SI unit of time is seconds.

3. Jul 7, 2017

### Bandersnatch

When they talk about this (at around 12:30) mark, they specifically state that in the equation $s(t)=ct^2$, the constant c is numerically equal to the distance fallen in the first second. It does not mean that the constant is a measure of distance, or that its units are that of distance. It merely means that its magnitude is that of the distance fallen during the first second.
The dimensions of c can be deduced from the equation provided above:
if s(t) (distance) is measured in metres, and
t (time) is measured in seconds,
then the dimension of the constant must be [m/s^2], so that when you write the equation in terms of units, you get:
$m= m/s^2*s^2$
and the left side is equal to the right side.
That is, the constant c is acceleration.

Replace each instance of 'Distance Fallen in first second' with acceleration, and you'll have everything agree - everything apart from
Which should read $a(t) = 2c$, as they show in the video. (i.e., you made a mistake there)

4. Jul 7, 2017

### icandothemath

Thanks Bandersnatch,
Distance Fallen in first second = acceleration was the key to making everything work.

Displacement in meters = m/s2 * s2
Velocity in meters per second = 2 * m/s2 * s - m/s2 * s
Acceleration in meters per second squared = 2 * m/s2
Gravity in meters per second squared = 2 * m/s2

"Distance Fallen in first second" sounded like m/s (or velocity) at first for me. Like it falls this distance in a second.
How do you come up with acceleration?

5. Jul 7, 2017

### Bandersnatch

It does fall that much in the first second, but first second only. When you have $s(t)=ct^2$, and you set t=1s, then whatever is on the right hand side will tell you 's(1)', i.e. how much something falls in the first second. Since t=1, the only numerical value of this 'how much' must come from the constant c. But since setting t=1 did not make its units disappear (t^2 is 1 [s^2]), the dimensions of c can not be just metres. In fact, in order for the right hand side ([units of c] times [s^2]) to equal the left hand side ([m]), the dimensions of c must be m/s^2.

Imagine you have an object falling in gravitational field near the surface of Earth, with gravitational acceleration g=10m/s^2 (and c=g/2). The equation $s(t)=ct^2$ tells you that after one second, the object falling under this acceleration will have fallen 5 metres.

6. Jul 7, 2017

### icandothemath

The math you posted makes sense if we are really talking about "Velocity in the first second" m/s^2
I think the mess up in my mind is the description of "Distance Fallen in first second"

Should the speaker have said "Velocity in the first second"?

7. Jul 7, 2017

### Bandersnatch

No. Velocity after 1 second is V(1) = 2ct, with t=1s.

Analogous to the distance example, if you substitute t=1s, the V(1) will be numerically equal to 2c. In this case, the speaker would be entirely justified in saying that 2c has a magnitude of velocity after 1 second, even though c is still acceleration.
Dimensional analysis again proves that c is acceleration, since:
left hand side is [m/s]
right hand side is [units of c] times [s)
For both sides to be equal, [units of c] must be [m/s^2]

8. Jul 7, 2017

### icandothemath

Thanks for bearing with me, I don't know why this is so hard for me to get my head around. I think it is starting to sink in.
c = Acceleration = the numerical value of Distance Fallen in first second
So, we're really talking about acceleration in that first second.

At one second Distance, Velocity, and Acceleration are all the same numerical value but with different si units.
For example:
change in distance = d2 - d1 = 10m
change in velocity = change in distance / 1s = 10m/s (since initial velocity is 0)
Acceleration = change in velocity / 1s = 10/m/s^2 (since initial velocity is 0)

So, when he says Distance Fallen in the first second the numerical value works.
But we're really talking about Acceleration which makes the si units and numerical values work.


text:
# 3.2 Fast fourier transform (fft)  (Page 2/2)

Now for the fun. Because $N=2^{L}$ , each of the half-length transforms can be reduced to two quarter-length transforms, each of these to twoeighth-length ones, etc. This decomposition continues until we are left with length-2 transforms. This transform is quitesimple, involving only additions. Thus, the first stage of the FFT has $\frac{N}{2}$ length-2 transforms (see the bottom part of [link] ). Pairs of these transforms are combined by adding one to the other multiplied by a complexexponential. Each pair requires 4 additions and 2 multiplications, giving a total number of computations equaling $6·\frac{N}{4}=\frac{3N}{2}$ . This number of computations does not change from stage to stage.Because the number of stages, the number of times the length can be divided by two, equals $\log_{2}N$ , the number of arithmetic operations equals $\frac{3N}{2}\log_{2}N$ , which makes the complexity of the FFT $O(N\log_{2}N)$ .

Doing an example will make computational savings more obvious. Let's look at the detailsof a length-8 DFT. As shown on [link] , we first decompose the DFT into two length-4 DFTs, with the outputs added and subtracted together in pairs.Considering [link] as the frequency index goes from 0 through 7, we recycle values fromthe length-4 DFTs into the final calculation because of the periodicity of the DFT output. Examining how pairs of outputsare collected together, we create the basic computational element known as a butterfly ( [link] ).

By considering together the computations involving common output frequencies from the two half-length DFTs, we see that the twocomplex multiplies are related to each other, and we can reduce our computational work even further. By further decomposing thelength-4 DFTs into two length-2 DFTs and combining their outputs, we arrive at the diagram summarizing the length-8 fastFourier transform ( [link] ). Although most of the complex multiplies are quite simple(multiplying by $e^{-(i\frac{\pi }{2})}$ means swapping real and imaginary parts and changing their signs), let's count those forpurposes of evaluating the complexity as full complex multiplies. We have $\frac{N}{2}=4$ complex multiplies and $N=8$ complex additions for each stage and $\log_{2}N=3$ stages, making the number of basic computations $\frac{3N}{2}\log_{2}N$ as predicted.

Note that the ordering of the input sequence in the two parts of [link] aren't quite the same. Why not? How is the ordering determined?

The upper panel has not used the FFT algorithm to compute the length-4 DFTs while the lower one has. The ordering isdetermined by the algorithm.

Other "fast" algorithms were discovered, all of which make use of how many common factors the transformlength $N$ has. In number theory, the number of prime factors a given integer has measures how composite it is. The numbers 16 and 81 are highly composite (equaling $2^{4}$ and $3^{4}$ respectively), the number 18 is less so ( $2^{1}·3^{2}$ ), and 17 not at all (it's prime). In over thirty years of Fourier transform algorithm development, the originalCooley-Tukey algorithm is far and away the most frequently used. It is so computationally efficient that power-of-twotransform lengths are frequently used regardless of what the actual length of the data.

Suppose the length of the signal were $500$ ? How would you compute the spectrum of this signal using the Cooley-Tukeyalgorithm? What would the length $N$ of the transform be?

The transform can have any greater than or equal to the actual duration of the signal. We simply“pad” the signal with zero-valued samples until a computationally advantageous signal length results. Recallthat the FFT is an algorithm to compute the DFT . Extending the length of the signal this way merely means weare sampling the frequency axis more finely than required. To use the Cooley-Tukey algorithm, the length of theresulting zero-padded signal can be 512, 1024, etc. samples long.

Is there any normative that regulates the use of silver nanoparticles?
what king of growth are you checking .?
Renato
What fields keep nano created devices from performing or assimulating ? Magnetic fields ? Are do they assimilate ?
why we need to study biomolecules, molecular biology in nanotechnology?
?
Kyle
yes I'm doing my masters in nanotechnology, we are being studying all these domains as well..
why?
what school?
Kyle
biomolecules are e building blocks of every organics and inorganic materials.
Joe
anyone know any internet site where one can find nanotechnology papers?
research.net
kanaga
sciencedirect big data base
Ernesto
Introduction about quantum dots in nanotechnology
what does nano mean?
nano basically means 10^(-9). nanometer is a unit to measure length.
Bharti
do you think it's worthwhile in the long term to study the effects and possibilities of nanotechnology on viral treatment?
absolutely yes
Daniel
how to know photocatalytic properties of tio2 nanoparticles...what to do now
it is a goid question and i want to know the answer as well
Maciej
Abigail
for teaching engĺish at school how nano technology help us
Anassong
Do somebody tell me a best nano engineering book for beginners?
there is no specific books for beginners but there is book called principle of nanotechnology
NANO
what is fullerene does it is used to make bukky balls
are you nano engineer ?
s.
fullerene is a bucky ball aka Carbon 60 molecule. It was name by the architect Fuller. He design the geodesic dome. it resembles a soccer ball.
Tarell
what is the actual application of fullerenes nowadays?
Damian
That is a great question Damian. best way to answer that question is to Google it. there are hundreds of applications for buck minister fullerenes, from medical to aerospace. you can also find plenty of research papers that will give you great detail on the potential applications of fullerenes.
Tarell
what is the Synthesis, properties,and applications of carbon nano chemistry
Mostly, they use nano carbon for electronics and for materials to be strengthened.
Virgil
is Bucky paper clear?
CYNTHIA
carbon nanotubes has various application in fuel cells membrane, current research on cancer drug,and in electronics MEMS and NEMS etc
NANO
so some one know about replacing silicon atom with phosphorous in semiconductors device?
Yeah, it is a pain to say the least. You basically have to heat the substarte up to around 1000 degrees celcius then pass phosphene gas over top of it, which is explosive and toxic by the way, under very low pressure.
Harper
Do you know which machine is used to that process?
s.
how to fabricate graphene ink ?
for screen printed electrodes ?
SUYASH
What is lattice structure?
of graphene you mean?
Ebrahim
or in general
Ebrahim
in general
s.
Graphene has a hexagonal structure
tahir
On having this app for quite a bit time, Haven't realised there's a chat room in it.
Cied
what is biological synthesis of nanoparticles
how did you get the value of 2000N.What calculations are needed to arrive at it
Privacy Information Security Software Version 1.1a
Good
Berger describes sociologists as concerned with
Got questions? Join the online conversation and get instant answers!

format: plain


text:
Recently I needed to install a recent version of R on a system where I have a non-root account. It does not provide any of the development libraries that R requires, so I had to compile them all myself. Here I document a few things that I learned in the process. The command lines that I used are documented in my dotfiles repo.

Basically for each of the libraries that R needs (zlib, curl, bzip2, xz, pcre) I had to download the source code and install it to my home directory. In most cases this means doing something pretty standard like

cd ~/R
wget https://tukaani.org/xz/xz-5.2.3.tar.gz
tar xf xz-5.2.3.tar.gz
cd xz-5.2.3
./configure --prefix=$HOME make make install  However in two cases there was something non-standard that I had to do. The first case is bzip2 which does not have a configure script. Instead it just provides a Makefile. So I compiled it using make and make install, and that was fine. But then when I compiled R I got the following error: /usr/bin/ld: /home/thocking/lib/libbz2.a(bzlib.o): relocation R_X86_64_32S against .text' can not be used when making a shared object; recompile with -fPIC  To fix that error I had to add -fPIC to CFLAGS in the Makefile before compiling and installing bzip2: cd ~/R wget http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz tar xf bzip2-1.0.6.tar.gz cd bzip2-1.0.6 sed -i 's/^CFLAGS=-Wall/CFLAGS=-fPIC -Wall/' Makefile make make install PREFIX=$HOME

The other issue is that installing PCRE with default options yields the following error when compiling R:

checking whether PCRE support suffices... configure: error: pcre >= 8.20 library and headers are required

To fix that PCRE needs to be compiled with the –enable-utf8 flag, as below.

cd ~/R
wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.41.tar.bz2
tar xf pcre-8.41.tar.bz2
cd pcre-8.41
./configure --enable-utf8 --prefix=$HOME make make install  Finally to compile R we need to specify the non-standard installation directory in both CPPFLAGS and LDFLAGS: cd ~/R wget ftp://ftp.stat.math.ethz.ch/CRAN/src/base/R-3/R-3.4.1.tar.gz tar xf R-3.4.1.tar.gz cd R-3.4.1 CPPFLAGS=-I$HOME/include LDFLAGS="-L$HOME/lib -Wl,-rpath=$HOME/lib" ./configure --prefix=$HOME --with-cairo --with-blas --with-lapack --enable-R-shlib make make install  On a related note, I recently had to figure out how to do the same thing for R packages. For example my PeakSegPipeline package needs BerkeleyDB STL to compile. On one system I have BerkeleyDB STL installed in a non-standard directory,$HOME. To tell R to look there when installing PeakSegPipeline, I needed to put the following in ~/.R/Makevars

CPPFLAGS=-I${HOME}/include LDFLAGS=-L${HOME}/lib -Wl,-rpath=\${HOME}/lib
`

The CPPFLAGS are added to the command lines used to compile the object files (*.o), and the LDFLAGS are used in the final command used to create the shared object file (PeakSegPipeline.so). Note that the above is Makefile syntax so curly braces are required for environment variables. Also it is very important that there are no quotation marks in LDFLAGS above! (otherwise the second argument is actually treated as a part of the lib directory of first argument)


text:
# How do you use the first and second derivatives to sketch f(x)=x^2/(x^2+5)?

Feb 5, 2017

See the explanation below

graph{x^2/(x^2+5) [-5, 5, -2.5, 2.5]}

#### Explanation:

First we note that, as ${x}^{2} + 5 > 0$ for all $x$, the function is defined and continuous in all of $\mathbb{R}$.

We also note that as the numerator and denominator only contain terms of even degree in $x$ the function is even, that is:

$f \left(- x\right) = f \left(x\right)$

so the graph will be symmetric with respect to the $y$ axis.

We then evaluate the behavior at the limits of the domain:

${\lim}_{x \to - \infty} {x}^{2} / \left({x}^{2} + 5\right) = {\lim}_{x \to + \infty} {x}^{2} / \left({x}^{2} + 5\right) = 1$

so on both sides the line $y = 1$ is an asymptote.

Now we calculate the first derivative using the quotient rule:

$f ' \left(x\right) = \frac{2 x \left({x}^{2} + 5\right) - 2 {x}^{3}}{{x}^{2} + 5} ^ 2 = \frac{10 x}{{x}^{2} + 5} ^ 2$

The only critical point is then $x = 0$ and we have:

$\left\{\begin{matrix}f ' \left(x\right) < 0 \text{ for " x < 0 \\ f'(x) > 0 " for } x > 0\end{matrix}\right.$

so $f \left(x\right)$ is decreasing in $\left(- \infty , 0\right)$ and increasing in $\left(0 , + \infty\right)$, which means the value for $x = 0$ is a local minimum.

As the value of the minimum is $f \left(0\right) = 0$ and the function is positive everywhere else, this is also an absolute minimum.

Calculating the second derivative:

$f ' ' \left(x\right) = \frac{10 {\left({x}^{2} + 5\right)}^{2} - 40 {x}^{2} \left({x}^{2} + 5\right)}{{x}^{2} + 5} ^ 4 = \frac{10 {x}^{2} + 50 - 40 {x}^{2}}{{x}^{2} + 5} ^ 3 = - 10 \frac{3 {x}^{2} - 5}{{x}^{2} + 5} ^ 3$

The points of inflection are then the roots of:

$3 {x}^{2} - 5 = 0$

$x = \pm \sqrt{\frac{5}{3}}$

to solve the inequation $f ' ' \left(x\right) > 0$ we can then note that:

(i) the denominator is always positive

(ii) the numerator $3 {x}^{2} - 5$ is a second order polynomial with two roots, so it is negative in the interval between the roots and positive outside.

(iii) the sign of $f ' ' \left(x\right)$ is the opposite of the numerator's.

Then:

$f \left(x\right)$ is concave down for $x \in \left(- \infty , - \sqrt{\frac{5}{3}}\right)$

$f \left(x\right)$ is concave up for $x \in \left(- \sqrt{\frac{5}{3}} , \sqrt{\frac{5}{3}}\right)$

$f \left(x\right)$ is concave down for $x \in \left(\sqrt{\frac{5}{3}} , + \infty\right)$

Mar 29, 2017


text:
# How to show that if a 3x3 matrix A and it's diagonal B are in SO(3) that their product is in SO(3)

I can easily determine part a and c but am stuck when it comes to part b and d. Any help would be greatly appreciated. I apologize for any formatting errors I am new to math.stackexchange.com I promise I tried to do my best to make it readable for all you wonderful people! Looks like this was asked here: https://math.stackexchange.com/questions/577732/a-couple-questions-about-a-3-by-3-matrix-a but even with Any's answer I am unable to understand and complete parts b and d. Without further dilly-daddling here is the question:

Let SO(3) denote the set of 3x3 matrices A such that A has real entries, $det(A)=1$, and $A^T$= $A^{-1}$.

(a) Show that the matrix A is in SO(3): $$A = \begin{pmatrix} 1 & 0 & 0 \\ 0 & \cos(x) & -\sin(x) \\ 0 & \sin(x) & cos(x) \end{pmatrix}$$ This matrix can be described as "a rotation of $R^3$ with axis v = $[1,0,0]^T$. Let v be any unit length vector in $R^3$ and let F = [v, v', v''] be any ordered orthonormal basis for $R^3$ containing this vector v. Let P = [v v' v''] be the transition matrix from F to the standard basis. Show that for the matrix A above, if we define $B = PAP^{-1}$ then, B is in SO(3) and $Bv = v$

(b) Show that if $A$ and $B$ are in $SO(3)$, then their product $AB$ is also in $SO(3)$

(c) Show that if A is a 3x3 matrix, then $det(-A) = -det(A)$

(d) Show that if $A$ is in $SO(3)$ then there is a vector $v$ in $R^3$ such that $Av = v$. To do this, you need to show that $A - I$ is singular. Consider the determinant of $A - I$. Use the fact $A^T = A^{-1}$.

Work attempted so far:

a) I've easily determined the determinant of A (hehe) to be 1 using the fact that $cos^2(\theta) + sin^2(\theta)$ = 1 and I have computed $A^T$ and verified that it is equal to $A^{-1}$. Since A contains all real values it meets the criteria of being in SO(3) part (a) is completed without issue.

b) I am not sure if I can do this... but since we are given $B = PAP^{-1}$ can $AB$ be rewritten as $APAP^{-1}$ and furthermore rewritten $A^2PP^{-1}$ and since $PP^{-1} = I$ can AB be rewritten as $A^2I$? If so proving that $A^2I$ is in SO(3) is rather trivial and I don't need any further help with this part of the question just want to make sure I am approaching the question correctly.

c)This is easily done by taking the opposite of all the values in matrix A and checking if the value is equal to the opposite of det(A). As long as this is the correct approach I don't need further help.

d) $$A-I = \begin{pmatrix} 0 & 0 & 0 \\ 0 & \cos(x)-1 & -\sin(x) \\ 0 & \sin(x) & cos(x)-1 \end{pmatrix}$$ Since top row is all 0's det(A-I)= 0 so we have shown the matrix A-I is singular. We have already shown in part (a) that $A^T = A^{-1}$ but I get stuck trying to show there is a vector v in $R^3$ such that $Av=v$ any suggestions/starting points for this question would be a huge help.

First of all, considering how the question is phrased I assume that in parts b) through d) the matrix $A$ is supposed to be an arbitrary element in $SO(3)$ and not the specific one from part a). My answers/hints are intended for an arbitrary $A$ in $SO(3)$ though they will work for the specific $A$ from part a).

b) The question states that both $A$ and $B$ are in $SO(3)$. Therefore, $\text{det}A = 1 = \text{det}B$ and $B^T = B^{-1}$ and $A^T = A^{-1}$. From this you can directly check that $\text{det}AB = 1$ and that $(AB)^T = (AB)^{-1}$.

c) Your approach is correct but presumably you should write it out for a general $(3 \times 3)$-matrix and not just the one from part a).

d) A vector $v$ satisfies $Av = v$ precisely when it satisfies $(A-I)v = 0$. We know that a matrix $B$ has a non-trivial solution to $Bv= 0$ precisely if it is singular. Therefore, the only thing we have to do is to show that $\text{det}(A-I) = 0$.

Hopefully this helps.

• Thanks for the insights! From my understanding of the question it is supposed to be for the given matrix $A$ but I now understand how one would generalize it for any arbitrary matrix $A$ in $SO(3)$ – do-ent Nov 23 '13 at 23:26

$A,B \in SO(3) \implies A^T = A^{-1}, \det(A) = 1 \ etc.\ \implies \det(AB) = \det(A)\det(B) = 1$ and $(AB)^{-1} = B^{-1} A^{-1} = B^T A^T = (AB)^T$. So you're done.

You want to find $v$ such that $Av = v$. That's called an eigenvector of $A$ of eigenvalue $1$. And to find those you observe that

$Av = \lambda v \iff (A - \lambda I) v = 0$. Now if $(A - \lambda I)$ is invertible then the only eigenvector is $0$, so you want to find where it's non-invertible (singular) and that is precisely when $\det(A-\lambda I) = 0$. So you need to solve for the roots o a polynomial called the characteristic polynomial and given by $\det(A - \lambda I) = 0$. Then you want to show that one of those roots is $1$.

Equivalently you can show that $(A-I)$ is non-invertible. Notice that the expression $(I-A)^{-1}$ looks alot like the formula for summing a geometric series $\sum_{k\geq 1} r^k$. Consider the geometric series $I + A + A^2 + \dots$. If it converges then so does $C + CA + C(A^2) + \dots$ for all square matrices $C$. Prove that.

Then in the same way you find the geometric series formula in a field, we have :

$$S = \sum_{k \geq 0} A^{k} \\ \implies \\ AS = S - I \\ \implies \\ S(A - I) = I \\ \implies \\ S = (A - I)^{-1}$$

So if the summation converges, then $(A - I)$ is invertible. The contrapositive is that if $(A-I)$ is non-invertible, then the summation diverges. Unfortunately we need more than that, we need that if the summation diverges then $(A-I)$ is non-invertible.

Let $A = \begin{pmatrix} 1 & 0 & 0 \\ 0 & e^{i\theta} & \dots \\ 0 & \vdots & \ddots \end{pmatrix}$. I.e. the vector $v$ fixed by $A$ is $\hat{x} = (1,0,0)^T$. So it's rotation around the $x$-axis.

If $\theta = \pi$ in the above then $A = \begin{pmatrix} 1 & 0 & 0 \\ 0 &-1 & 0 \\ 0 & 0 & -1 \end{pmatrix}$. Then $I + A + A^2 + \dots$ diverges as it's composed of diverging entries. Let $S(X) = I + A + A^2 + \dots$. Show that $S(A^k)$ diverges for any $k \in \Bbb{Z}$.

Let $H = \langle A \rangle = \{\dots, A^{-2}, A^{-1}, I, A, A^2, \dots \}$ be the subgroup of $G = SO(3)$ generated by $A$. The conjugacy classes of a subgroup $H$ partition a group $G$, so for all $B \in SO(3)$ we can write $B = C A^k C^{-1}$ for some $k \in \Bbb{Z}$, $C \in SO(3)$. Then does $S(B)$ converge or diverge? If it converges, then $S(B) = S(C A^k C^{-1}) = I + C A^k C^{-1} + C(A^k)^2 C^{-1} + \dots$. But if that converges then so does $$C^{-1}S(B)C = I + C^{-1}C A^k C^{-1} C + C^{-1}C (A^k)^2 C^{-1} C + \dots = S(A^k)$$, a contradiction.

Thus $S(B)$ diverges for all $B \in SO(3)$.

To finish the proof you may want to check that since $S(B)$ diverges for each $B \in SO(3)$, the eigenvalue $1$ exists for each $B$.

• Thanks for the clear and concise answer! I think I was over thinking part (b) a little too much haha but now I understand it – do-ent Nov 23 '13 at 23:21
• Let me know if I can clear it up or explain further. – Shine On You Crazy Diamond Nov 24 '13 at 1:35

For part (d) you can think of it geometrically. If $A$ has the special form that you described then it is a rotation around the vector $\left< 1,0,0\right>$. If you let $v$ be this point on the sphere then $Av = v$ since $A$ fixes its axis-of-rotation. Now more generally if $A$ is any rotation of the sphere then it has some axis-of-rotation $v$ and so you expect $Av = v$.


text:
# tikzmark for math inside tikz node label

I am looking for a way to mark particular positions within the math-text of node.

My MNWE is:

\documentclass[tikz]{standalone}
\usepackage{mathtools,xparse,bm}
\usetikzlibrary{tikzmark}
\NewDocumentCommand{\outermacro}{mO{}}{ p( #1 \mid #2 ) }
\NewDocumentCommand{\innermacro}{mO{}}{ \bm{x}_{#1}^{#2} }
\begin{document}
\begin{tikzpicture}
%       \node (n1) at (0,0) { $\outermacro{ X }[ \subnode{x}{ \innermacro{2}[z] } ]$ }; % complains about missing $\node (n2) at (2,0) {$\outermacro{ X }[ \innermacro{2}[z] ]$}; % test for both macros, doesn't do what I want \node (n4) at (0.5,1) {this is a note}; \draw (n4) -- (x.center); \end{tikzpicture} \end{document}  For the "real" case,I get the errors as given in the comment. What is the right way of doing this? P.S.: the subnode part, I stole from https://tex.stackexchange.com/a/287727/34538 EDIT: I tried  \begin{tikzpicture} \node (n1) at (0,0) {$\outermacro{ X }[ \pgfmark{x}\innermacro{2}[z] ]$}; % complains about missing$
\node (n2) at (3,0) { $\outermacro{ X }[ \innermacro{2}[z] ]$ }; % test for both macros
\node (n4) at (0.5,1) {this is a note};
\draw (n4) -- (pic cs:x);
\end{tikzpicture}

which compiles, but does not yield a line to correct position.

• Have you try with \subnode? See the documentation of tikzmark pag.7. – vi pa Feb 18 at 12:02
• @vipa, yes, please see the part before the edit (the commented line) – bonanza Feb 18 at 12:03

I was having all sorts of problems with far simpler versions until I hit on [anchor=base]. Only then did the coordinates line up.

I might add that putting a tikzpicture (or tikzmark) inside a node is a bad idea, and using the [tikz] option of standalone puts every tikzpicture on a separate page.

\documentclass{standalone}
\usepackage{tikz}
\usepackage{mathtools,xparse,bm}
\usetikzlibrary{tikzmark}
\NewDocumentCommand{\outermacro}{mO{}}{ p( #1 \mid #2 ) }
\NewDocumentCommand{\innermacro}{mO{}}{ \bm{x}_{#1}^{#2} }

\newsavebox{\tempbox}
\begin{document}
\savebox{\tempbox}{$\outermacro{ X }[\tikzmark{x}\innermacro{2}[z]]$}%
\begin{tikzpicture}[remember picture, every node/.style={anchor=base}]
\node (n1) at (0,0) {\usebox{\tempbox}};
\node (n2) at (3,0) { $\outermacro{ X }[\innermacro{2}[z]]$ }; % test for both macros
\node (n4) at (0.5,1) {this is a note};
\draw (n4) -- (pic cs:x);
\end{tikzpicture}
\end{document}

Using overlay, remember picture solves the problem:

    \begin{tikzpicture}[overlay, remember picture]
\node (n1) at (0,0) { $\outermacro{ X }[ \pgfmark{x}\innermacro{2}[z]\pgfmark{y} ]$ };
\node (n4) at (0.5,1) {this is a note};
\node[fit=(pic cs:x) (pic cs:y)] (target) {};
\draw (n4) -- (target);
\end{tikzpicture}

• No overlay needed here. All text is inside the bounding box. – John Kormylo Feb 16 at 16:12
• @bonanza for use fit you must load the fit library. – vi pa Feb 18 at 12:08


text:
# Question #4fe1b

Aug 28, 2016

Given equation can be written as

$6 \sin \left(\frac{\pi}{12} \left(x - 11\right)\right) + 19 = 19$

$\implies 6 \sin \left(\frac{\pi}{12} \left(x - 11\right)\right) = 19 - 19 = 0$

$\implies \sin \left(\frac{\pi}{12} \left(x - 11\right)\right) = \frac{0}{6} = 0$

$\implies \left(\frac{\pi}{12} \left(x - 11\right)\right) = n \pi$,$\text{ where } n \in \mathbb{Z}$

$\therefore x = 12 n + 11$$\text{ where } n \in \mathbb{Z}$


text:
## Douglas, Jesse

Compute Distance To:
 Author ID: douglas.jesse Published as: Douglas, J.; Douglas, Jesse External Links: MacTutor · MGP · Wikidata · GND · IdRef Awards: Fields Medal (1936)
 Documents Indexed: 148 Publications since 1917, including 1 Book Biographic References: 8 Publications Co-Authors: 1 Co-Author with 3 Joint Publications 4 Co-Co-Authors

### Co-Authors

 145 single-authored 3 Franklin, Philip
all top 5

### Serials

 64 Bulletin of the American Mathematical Society 39 Proceedings of the National Academy of Sciences of the United States of America 14 Transactions of the American Mathematical Society 9 Journal of Mathematics and Physics 6 Annals of Mathematics. Second Series 4 American Journal of Mathematics 4 Duke Mathematical Journal 2 Mathematische Annalen 2 Scripta Mathematica 2 Annali della Scuola Normale Superiore di Pisa. II. Ser 1 American Mathematical Monthly

### Fields

 7 Differential geometry (53-XX) 6 Calculus of variations and optimal control; optimization (49-XX) 1 Group theory and generalizations (20-XX) 1 Functions of a complex variable (30-XX)

### Citations contained in zbMATH Open

49 Publications have been cited 473 times in 391 Documents Cited by Year
Solution of the inverse problem of the calculus of variations. JFM 67.1038.01
Douglas, J.
1941
Solution of the problem of Plateau. Zbl 0001.14102
Douglas, Jesse
1931
Solution of the problem of Plateau. JFM 57.1542.03
Douglas, J.
1931
The general geometry of paths. JFM 54.0757.06
Douglas, J.
1928
Solution of the inverse problem of the calculus of variations. Zbl 0025.18102
Douglas, Jesse
1941
Solution of the problem of Plateau. JFM 57.0601.01
Douglas, J.
1931
Minimal surfaces of higher topological structure. JFM 65.0454.01
Douglas, J.
1939
Minimal surfaces of higher topological structure. Zbl 0020.37402
Douglas, Jesse
1939
Systems of $$K$$-dimensional manifolds in an $$N$$-dimensional space. Zbl 0003.16902
Douglas, Jesse
1931
The problem of Plateau for two contours. Zbl 0004.15403
Douglas, Jesse
1931
A method of numerical solution of the problem of Plateau. JFM 54.0509.02
Douglas, J.
1928
On the supersolvability of bicyclic groups. Zbl 0099.01403
Douglas, Jesse
1961
On finite groups with two independent generators. I. Zbl 0043.02403
Douglas, Jesse
1951
Geometry of polygons in the complex plane. JFM 66.0728.03
Douglas, J.
1940
Some new results in the problem of Plateau. Zbl 0013.41703
Douglas, Jesse
1936
One-sided minimal surfaces with a given boundary. JFM 58.1245.03
Douglas, J.
1932
One-sided minimal surfaces with a given boundary. Zbl 0005.37603
Douglas, Jesse
1932
Minimal surfaces of general topological structure with any finite number of assigned boundaries. Zbl 0015.02803
Douglas, Jesse
1936
The most general form of the problem of Plateau. Zbl 0021.32801
Douglas, Jesse
1939
Solution of the inverse problem of the calculus of variations. Zbl 0023.13702
Douglas, Jesse
1939
On linear polygon transformations. JFM 66.0045.01
Douglas, J.
1940
Green’s function and the problem of Plateau. JFM 65.0454.02
Douglas, J.
1939
Theorems in the inverse problem in the calculus of variations. Zbl 0027.07001
Douglas, Jesse
1940
On linear polygon transformations. Zbl 0060.34111
Douglas, Jesse
1940
Some new results in the problem of Plateau. JFM 62.1462.02
Douglas, J.
1936
Minimal surfaces of higher topological structure. Zbl 0019.26802
Douglas, Jesse
1938
Green’s function and the problem of Plateuau. Zbl 0019.26901
Douglas, Jesse
1938
The most general form of the problem of Plateau. Zbl 0019.26902
Douglas, Jesse
1938
The problem of Plateau for two contours. Correction. JFM 57.0600.02
Douglas, J.
1931
The mapping theorem of Koebe and the problem of Plateau. JFM 57.1543.01
Douglas, J.
1931
A criterion for the conformal equivalence of a Riemann space to a euclidean space. JFM 51.0568.02
Douglas, J.
1925
Green’s function and the problem of Plateau. JFM 64.0718.03
Douglas, J.
1938
Theorems in the inverse problem of the calculus of variations. JFM 66.1272.02
Douglas, J.
1940
The most general form of the problem of Plateau. JFM 65.0456.02
Douglas, J.
1939
Solution of the inverse problem of the calculus of variations. JFM 65.1293.03
Douglas, J.
1939
The mapping theorem of Koebe and the problem of Plateau. Zbl 0002.26901
Douglas, Jesse
1931
Seven theorems in the problem of Plateau. Zbl 0003.32801
Douglas, Jesse
1932
A Jordan space curve no arc of which can form part of a contour which bounds a finite area. Zbl 0009.02402
Douglas, Jesse
1934
Remarks on Riemann’s doctoral dissertation. Zbl 0019.21805
Douglas, Jesse
1938
The analytic prolongation of a minimal surface over a rectilinear segment of its boundary. Zbl 0020.37401
Douglas, Jesse
1939
On finite groups with two independent generators. II. Zbl 0044.01401
Douglas, Jesse
1951
On the basis theorem for finite abelian groups. IV. Zbl 0053.01302
Douglas, Jesse
1953
The problem of Plateau. JFM 59.0669.02
Douglas, J.
1933
Reduction of the problem of Plateau to an integral equation. JFM 53.0385.08
Douglas, J.
1927
Reduction to integral equations of the problem of Plateau for the case of two contours. JFM 53.0385.09
Douglas, J.
1927
Extremals and transversality of the general calculus of variations problem of the first order in space. JFM 53.0483.02
Douglas, J.
1927
The most general form of the problem of Plateau. JFM 64.0718.04
Douglas, J.
1938
Remarks on Riemann’s doctoral dissertation. JFM 64.1186.02
Douglas, J.
1938
Minimal surfaces of general topological structure with any finite number of assigned boundaries. JFM 62.1462.03
Douglas, J.
1936
On the supersolvability of bicyclic groups. Zbl 0099.01403
Douglas, Jesse
1961
On the basis theorem for finite abelian groups. IV. Zbl 0053.01302
Douglas, Jesse
1953
On finite groups with two independent generators. I. Zbl 0043.02403
Douglas, Jesse
1951
On finite groups with two independent generators. II. Zbl 0044.01401
Douglas, Jesse
1951
Solution of the inverse problem of the calculus of variations. JFM 67.1038.01
Douglas, J.
1941
Solution of the inverse problem of the calculus of variations. Zbl 0025.18102
Douglas, Jesse
1941
Geometry of polygons in the complex plane. JFM 66.0728.03
Douglas, J.
1940
On linear polygon transformations. JFM 66.0045.01
Douglas, J.
1940
Theorems in the inverse problem in the calculus of variations. Zbl 0027.07001
Douglas, Jesse
1940
On linear polygon transformations. Zbl 0060.34111
Douglas, Jesse
1940
Theorems in the inverse problem of the calculus of variations. JFM 66.1272.02
Douglas, J.
1940
Minimal surfaces of higher topological structure. JFM 65.0454.01
Douglas, J.
1939
Minimal surfaces of higher topological structure. Zbl 0020.37402
Douglas, Jesse
1939
The most general form of the problem of Plateau. Zbl 0021.32801
Douglas, Jesse
1939
Solution of the inverse problem of the calculus of variations. Zbl 0023.13702
Douglas, Jesse
1939
Green’s function and the problem of Plateau. JFM 65.0454.02
Douglas, J.
1939
The most general form of the problem of Plateau. JFM 65.0456.02
Douglas, J.
1939
Solution of the inverse problem of the calculus of variations. JFM 65.1293.03
Douglas, J.
1939
The analytic prolongation of a minimal surface over a rectilinear segment of its boundary. Zbl 0020.37401
Douglas, Jesse
1939
Minimal surfaces of higher topological structure. Zbl 0019.26802
Douglas, Jesse
1938
Green’s function and the problem of Plateuau. Zbl 0019.26901
Douglas, Jesse
1938
The most general form of the problem of Plateau. Zbl 0019.26902
Douglas, Jesse
1938
Green’s function and the problem of Plateau. JFM 64.0718.03
Douglas, J.
1938
Remarks on Riemann’s doctoral dissertation. Zbl 0019.21805
Douglas, Jesse
1938
The most general form of the problem of Plateau. JFM 64.0718.04
Douglas, J.
1938
Remarks on Riemann’s doctoral dissertation. JFM 64.1186.02
Douglas, J.
1938
Some new results in the problem of Plateau. Zbl 0013.41703
Douglas, Jesse
1936
Minimal surfaces of general topological structure with any finite number of assigned boundaries. Zbl 0015.02803
Douglas, Jesse
1936
Some new results in the problem of Plateau. JFM 62.1462.02
Douglas, J.
1936
Minimal surfaces of general topological structure with any finite number of assigned boundaries. JFM 62.1462.03
Douglas, J.
1936
A Jordan space curve no arc of which can form part of a contour which bounds a finite area. Zbl 0009.02402
Douglas, Jesse
1934
The problem of Plateau. JFM 59.0669.02
Douglas, J.
1933
One-sided minimal surfaces with a given boundary. JFM 58.1245.03
Douglas, J.
1932
One-sided minimal surfaces with a given boundary. Zbl 0005.37603
Douglas, Jesse
1932
Seven theorems in the problem of Plateau. Zbl 0003.32801
Douglas, Jesse
1932
Solution of the problem of Plateau. Zbl 0001.14102
Douglas, Jesse
1931
Solution of the problem of Plateau. JFM 57.1542.03
Douglas, J.
1931
Solution of the problem of Plateau. JFM 57.0601.01
Douglas, J.
1931
Systems of $$K$$-dimensional manifolds in an $$N$$-dimensional space. Zbl 0003.16902
Douglas, Jesse
1931
The problem of Plateau for two contours. Zbl 0004.15403
Douglas, Jesse
1931
The problem of Plateau for two contours. Correction. JFM 57.0600.02
Douglas, J.
1931
The mapping theorem of Koebe and the problem of Plateau. JFM 57.1543.01
Douglas, J.
1931
The mapping theorem of Koebe and the problem of Plateau. Zbl 0002.26901
Douglas, Jesse
1931
The general geometry of paths. JFM 54.0757.06
Douglas, J.
1928
A method of numerical solution of the problem of Plateau. JFM 54.0509.02
Douglas, J.
1928
Reduction of the problem of Plateau to an integral equation. JFM 53.0385.08
Douglas, J.
1927
Reduction to integral equations of the problem of Plateau for the case of two contours. JFM 53.0385.09
Douglas, J.
1927
Extremals and transversality of the general calculus of variations problem of the first order in space. JFM 53.0483.02
Douglas, J.
1927
A criterion for the conformal equivalence of a Riemann space to a euclidean space. JFM 51.0568.02
Douglas, J.
1925
all top 5

### Cited by 454 Authors

 10 Prince, Geoff E. 9 Mahomed, Fazal M. 8 Douglas, Jesse 8 Nitsche, Johannes Carl Christian 8 Saunders, David J. 8 Tromba, Anthony Joseph 7 Thompson, Gerard 6 Agore, Ana-Loredana 6 Gulliver, Robert D. II 6 Hildebrandt, Stefan 6 Hojman, Sergio A. 6 Sarlet, Willy 5 Alarcón, Antonio 5 Bucataru, Ioan 5 Crampin, Mike 5 Harrison, Jenny C. 5 Militaru, Gigel 5 Onninen, Jani 5 Wenger, Stefan 4 Ahmad, Daud 4 Beeson, Michael J. 4 Ghose Choudhury, Anindya 4 Guha, Partha 4 Muzsnay, Zoltán 4 Naeem, Imran 4 Nedela, Roman 4 Rossi, Olga 4 Škoviera, Martin 4 Wente, Henry C. 4 Yajima, Takahiro 3 Ali, Sajid 3 Bloch, Anthony Michael 3 Cariñena, José F. 3 Fleming, Wendell Helms 3 Hao, Yongxia 3 Jones, Gareth A. 3 Koski, Aleksis 3 Krupka, Demeter 3 Lopez Fernandez, Francisco Jose 3 Martín de Diego, David 3 Martínez Fernández, Eduardo 3 Matveev, Vladimir S. 3 Meeks, William Hamilton III 3 Mestdag, Tom 3 Mo, Xiaohuan 3 Muñoz Masqué, Jaime 3 Puiggalí, Marta Farré 3 Qadir, Asghar 3 Rund, Hanno 3 Sadeghzadeh, Nasrin 3 Struwe, Michael 3 Tomi, Friedrich 3 Yamada, Sumio 3 Yamasaki, Kazuhito 3 Yano, Kentaro 2 Aldridge, J. E. 2 Almgren, Frederick Justin jun. 2 Ayub, Muhammad 2 Banerjee, Kinjal 2 Barbero-Liñán, María 2 Coskunuzer, Baris 2 Courant, Richard 2 Do, Thoan 2 Du, Shaofei 2 Dziuk, Gerhard 2 Fan, Wenwen 2 Farooq, Muhammad Umar 2 Farré Puiggalí, M. 2 Fels, Mark E. 2 Fernández-Núñez, José 2 Ferreiro Pérez, Roberto 2 Fitzi, Martin 2 Forstnerič, Franc 2 Fried, Eliot 2 He, Ping 2 Heinz, Erhard 2 Hlavatý, Václav 2 Hu, Kan 2 Hutchinson, John Edward 2 Iwaniec, Tadeusz 2 Jost, Jürgen 2 Kawaguchi, Akitsugu 2 Kostadinov, Boyan 2 Kupriyanov, Vladislav G. 2 Li, Benling 2 Li, Chongjun 2 López, Gustavo V. 2 López, X. E. 2 Lytchak, Alexander 2 Makeenko, Yuri M. 2 Maleki, Maryam 2 Marmo, Giuseppe 2 Masud, Bilal 2 Mese, Chikako 2 Micallef, Mario J. 2 Morandi, Giuseppe 2 Nakai, Mitsuru 2 Nicollier, Grégoire 2 Nucci, Maria Clara 2 Peyghan, Esmaeil ...and 354 more Authors
all top 5

### Cited in 153 Serials

 20 Journal of Mathematical Physics 18 Mathematische Zeitschrift 18 Differential Geometry and its Applications 15 Transactions of the American Mathematical Society 13 Archive for Rational Mechanics and Analysis 10 Mathematische Annalen 8 Journal of Geometry and Physics 8 Annali di Matematica Pura ed Applicata. Serie Quarta 8 Calculus of Variations and Partial Differential Equations 7 Journal of Nonlinear Mathematical Physics 7 Bulletin of the American Mathematical Society 6 International Journal of Theoretical Physics 6 Proceedings of the American Mathematical Society 6 The Journal of Geometric Analysis 6 International Journal of Geometric Methods in Modern Physics 5 Journal of Mathematical Analysis and Applications 5 Applied Mathematics and Computation 5 Results in Mathematics 5 Journal of High Energy Physics 4 General Relativity and Gravitation 4 Acta Mathematica 4 Advances in Mathematics 4 Annales de l’Institut Fourier 4 Inventiones Mathematicae 4 Manuscripta Mathematica 4 Nonlinear Dynamics 4 Algebras and Representation Theory 3 Mathematical Proceedings of the Cambridge Philosophical Society 3 Reports on Mathematical Physics 3 Archiv der Mathematik 3 Numerische Mathematik 3 Proceedings of the Japan Academy. Series A 3 Journal de Mathématiques Pures et Appliquées. Neuvième Série 3 Linear Algebra and its Applications 3 Bulletin of the American Mathematical Society. New Series 3 International Journal of Bifurcation and Chaos in Applied Sciences and Engineering 3 Geometry & Topology 3 Advances in Calculus of Variations 2 Modern Physics Letters A 2 Acta Mathematica Academiae Scientiarum Hungaricae 2 Acta Mechanica 2 Jahresbericht der Deutschen Mathematiker-Vereinigung (DMV) 2 Journal d’Analyse Mathématique 2 Journal of Computational Physics 2 Nuclear Physics. B 2 Beiträge zur Algebra und Geometrie 2 Duke Mathematical Journal 2 Indiana University Mathematics Journal 2 Journal of Pure and Applied Algebra 2 Journal of Soviet Mathematics 2 European Journal of Combinatorics 2 Annals of Global Analysis and Geometry 2 Bulletin of the Iranian Mathematical Society 2 International Journal of Mathematics 2 Annales de l’Institut Henri Poincaré. Physique Théorique 2 Journal of Nonlinear Science 2 Journal of Mathematical Sciences (New York) 2 Mathematics and Mechanics of Solids 2 European Series in Applied and Industrial Mathematics (ESAIM): Control, Optimization and Calculus of Variations 2 Journal of the European Mathematical Society (JEMS) 2 Acta Mathematica Sinica. English Series 2 Communications in Nonlinear Science and Numerical Simulation 2 Communications in Contemporary Mathematics 2 Journal of the Australian Mathematical Society 2 Monatshefte für Mathematik und Physik 2 Annali della Scuola Normale Superiore di Pisa. II. Ser 2 Ars Mathematica Contemporanea 2 International Journal of Applied and Computational Mathematics 1 International Journal of Modern Physics A 1 Computers & Mathematics with Applications 1 Communications in Mathematical Physics 1 Computer Methods in Applied Mechanics and Engineering 1 Computer Physics Communications 1 Israel Journal of Mathematics 1 Journal of Fluid Mechanics 1 Journal of the Mechanics and Physics of Solids 1 Mathematische Semesterberichte 1 Physics Letters. A 1 Physics Reports 1 Rocky Mountain Journal of Mathematics 1 Theoretical and Mathematical Physics 1 Mathematics of Computation 1 Abhandlungen aus dem Mathematischen Seminar der Universität Hamburg 1 Acta Universitatis Palackianae Olomucensis. Facultas Rerum Naturalium. Mathematica 1 The Annals of Probability 1 Annali della Scuola Normale Superiore di Pisa. Classe di Scienze. Serie IV 1 BIT 1 Bulletin de la Société Mathématique de France 1 Canadian Mathematical Bulletin 1 Compositio Mathematica 1 Computing 1 Czechoslovak Mathematical Journal 1 Journal of Algebra 1 Journal of Combinatorial Theory. Series B 1 Journal of Computational and Applied Mathematics 1 Journal of Differential Equations 1 Journal of Functional Analysis 1 Journal für die Reine und Angewandte Mathematik 1 The Journal of Symbolic Logic 1 Matematički Vesnik ...and 53 more Serials
all top 5

### Cited in 53 Fields

 145 Differential geometry (53-XX) 114 Calculus of variations and optimal control; optimization (49-XX) 74 Global analysis, analysis on manifolds (58-XX) 55 Mechanics of particles and systems (70-XX) 36 Partial differential equations (35-XX) 31 Ordinary differential equations (34-XX) 24 Dynamical systems and ergodic theory (37-XX) 24 Quantum theory (81-XX) 20 Numerical analysis (65-XX) 18 Functions of a complex variable (30-XX) 11 Group theory and generalizations (20-XX) 11 Manifolds and cell complexes (57-XX) 11 Relativity and gravitational theory (83-XX) 10 Functional analysis (46-XX) 9 Potential theory (31-XX) 8 Combinatorics (05-XX) 8 Geometry (51-XX) 7 History and biography (01-XX) 7 Mechanics of deformable solids (74-XX) 6 Associative rings and algebras (16-XX) 6 Nonassociative rings and algebras (17-XX) 5 Several complex variables and analytic spaces (32-XX) 5 Convex and discrete geometry (52-XX) 5 Systems theory; control (93-XX) 4 Topological groups, Lie groups (22-XX) 4 Measure and integration (28-XX) 4 Operator theory (47-XX) 4 Probability theory and stochastic processes (60-XX) 3 Fluid mechanics (76-XX) 3 Operations research, mathematical programming (90-XX) 3 Game theory, economics, finance, and other social and behavioral sciences (91-XX) 2 Field theory and polynomials (12-XX) 2 Category theory; homological algebra (18-XX) 2 Real functions (26-XX) 2 Difference and functional equations (39-XX) 2 Algebraic topology (55-XX) 2 Statistics (62-XX) 2 Computer science (68-XX) 2 Statistical mechanics, structure of matter (82-XX) 2 Biology and other natural sciences (92-XX) 1 General and overarching topics; collections (00-XX) 1 Mathematical logic and foundations (03-XX) 1 General algebraic systems (08-XX) 1 Commutative algebra (13-XX) 1 Algebraic geometry (14-XX) 1 Linear and multilinear algebra; matrix theory (15-XX) 1 Approximations and expansions (41-XX) 1 Harmonic analysis on Euclidean spaces (42-XX) 1 Abstract harmonic analysis (43-XX) 1 Integral transforms, operational calculus (44-XX) 1 Integral equations (45-XX) 1 Optics, electromagnetic theory (78-XX) 1 Geophysics (86-XX)

### Wikidata Timeline

The data are displayed as stored in Wikidata under a Creative Commons CC0 License. Updates and corrections should be made in Wikidata.


text:
# Documenting R packages: roxygen2 vs. direct Rd input

R objects are documented in files written in “R documentation” (Rd) format, a simple markup language much of which closely resembles (La)TeX, which can be processed into a variety of formats, including LaTeX, HTML and plain text.

This LaTeX-like syntax, combined with the fact that the actual R objects live in a separate place, feels burdensome for many developers. As a consequence, there are a handful of tools aimed at improving the documentation process, one of which is roxygen2. We may say that the R community nowadays is divided between those who use roxygen2 and those who don’t.

The roxygen2 package allows us to write documentation right next to the code that is being described with decorated comments. The advantages are the following:

• Code and documentation are adjacent so when you modify your code, it’s easy to remember that you need to update the documentation.
• Roxygen2 dynamically inspects the objects that it’s documenting, so it can automatically add data that you’d otherwise have to write by hand.
• It abstracts over the differences in documenting S3 and S4 methods, generics and classes so you need to learn fewer details.

Although both roxygenists and non-roxygenists surely agree that documentation is one of the most important aspects of good code, the alleged benefits of roxygen2 could turn into a disadvantage. In the words of Duncan Murdoch,

This isn’t the fashionable point of view, but I think it is easier to get good documentation [by directly editing Rd files] than using Roxygen. […]

The reason I think this is that good documentation requires work and thought. You need to think about the markup that will get your point across, you need to think about putting together good examples, etc. This is harder in Roxygen than if you are writing Rd files, because Roxygen is a thin front end to produce Rd files from comments in your .R files. To get good stuff in the help page, you need just as much work as in writing the .Rd file directly, but then you need to add another layer on top to put in in a comment. Most people don’t bother.

Basically, roxygen2’s point is that you don’t need to work in the syntax, so that you can use that time to write actual documentation. Duncan’s point, instead, is that, if you don’t put effort in the writing process, there’s a chance that you won’t put any effort at all. Although I’m a happy roxygen2 user, I can see there’s a point in there, and an interesting analysis to be done.

In fact, if you happen to have an uncompressed copy of CRAN under, let’s say, ~/cran, you can execute the following script:

## Requires: r-lib/pkgdown, readr
setwd("~/cran")

get_lines <- function(Rd) {
# render as txt
txt <- try(capture.output(tools::Rd2txt(Rd)), silent=TRUE)
if (inherits(txt, "try-error")) # "rcqp" throws an error, why?
return(c(documentation=NA, examples=NA))
# remove blank lines
txt <- txt[!grepl("^[[:space:]]*$", txt)] # split documentation and examples examples <- grep("_\bE_\bx_\ba_\bm_\bp_\bl_\be_\bs:", txt) if (length(examples)) { doc <- txt[1:(examples-1)] exm <- txt[(examples+1):length(txt)] } else { doc <- txt exm <- NULL } # remove titles doc <- doc[!grepl("_\b", doc)] # output c(documentation=length(doc), examples=length(exm)) } do.call(rbind, parallel::mclapply(Sys.glob("*"), function(pkg) { message("Parsing ", pkg, "...") rds <- Sys.glob(file.path(pkg, "man", "*.[R|r]d")) if (!length(rds)) df <- data.frame(documentation=0, examples=0, functions=0) else { # get no. lines for documentation & examples df <- as.data.frame(t(rowSums(sapply(rds, get_lines), na.rm=TRUE))) # get no. exported functions df$functions <- sum(sapply(rds, function(rd) {
rd <- pkgdown:::rd_file(rd)
length(pkgdown:::usage_funs(pkgdown:::topic_usage(rd)))
}))
}
# RoxygenNote present?
desc <- file.path(pkg, "DESCRIPTION")
df$roxygen <- !is.na(read.dcf(desc, fields="RoxygenNote")[[1]]) df$pkg <- pkg
df
}, mc.cores=parallel::detectCores())) -> docLines

readr::write_csv(docLines, "docLines.csv")

to get this data frame. For each package on CRAN, we extract the number of lines of documentation and examples under the man directory, as rendered by tools::Rd2txt. We also count how many functions are documented, and we scan the DESCRIPTION file looking for the RoxygenNote, to tell which packages use roxygen2. This is all I need to see what I was looking for:

library(ggplot2)
library(dplyr)
library(tidyr)

filter(functions > 0) %>%
gather("type", "lines", documentation, examples)

ggplot(docLines, aes(lines/functions, color=roxygen, fill=roxygen)) + theme_bw() +
geom_density(alpha=.3) + facet_wrap(~type) + scale_x_log10()
## Warning: Transformation introduced infinite values in continuous x-axis
## Warning: Removed 221 rows containing non-finite values (stat_density).

Limitations:

• The method of extraction of documentation and examples is very coarse. For sure there are better ways.
• The amount of documentation must be weighted in some way. Just dividing it by the number of exported functions and methods may not be the best way.
• roxygen2 appeared in 2011, but I think it became more popular in recent years. It may be interesting to restrict the analysis to recent packages.
• Some developers prioritise vignettes over examples. It may be another interesting factor to analyse.

But all in all, I believe that this simple analysis proves Duncan right to some extent. And as a roxygen2 user that very much cares about documentation, this warns me against my own biases. If you care too, make sure that you really take advantage of the time you save with roxygen2.

## 5 comentarios sobre “Documenting R packages: roxygen2 vs. direct Rd input”

1. […] article was first published on R – Enchufa2, and kindly contributed to […]

2. […] Article originally published in Enchufa2.es: Documenting R packages: roxygen2 vs. direct Rd input. […]

3. […] Article originally published in Enchufa2.es: Documenting R packages: roxygen2 vs. direct Rd input. […]

4. Nice analysis. I’d like to see some more focused questions. There are plenty of instances where a dataset is provided with barely any description.

I don’t think I can give up roxygen2. I’ve only written one package before using roxygen and R Studio’s build tools, and the mental scars remain to this day. But I know for a fact my documentation’s been slipping in quality ever since using roxygen.

When you think about it, the internet (especially GitHub) means there are a lot of potential users for our packages, but they’ll only use what they understand. So adding one line of documentation could add more value than 10 new features.

5. Nice analysis. I’d like to see some more focused questions.

Me too! There is a lot of potential fun by playing with these data and the output from tools::CRAN_package_db(). If I had time… ;-)

So adding one line of documentation could add more value than 10 new features.

Agreed. And I particularly care about vignettes. That’s the first thing I look for when I start using a new package.


text:
Public Group

# Frustrating problem.

This topic is 3196 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

So I am just practicing on my logic by trying to solve some code chef problems. The particular problem is this problem . I believe my solution should work, but however, it keeps telling me that its wrong. Maybe there is a special case or something that I forgot to cover. Any help should be greatly appreciated, because its really, really, and I mean really, frustrating me. Here is my attempt. I didn't comment because I think it should be straight forward.
#include <iostream>
#include <string>
#include <sstream>
#include <algorithm>

using namespace std;

typedef unsigned long long BigDataType;

bool isPalindrome(const string& value){
int begin = 0;
int end = value.size() - 1;

while(begin < end){
if( value[begin++] != value[end--] ) return false;
}
return true;
}
template<typename Type>
string convertToString(const Type& num){
stringstream ss;
(ss << num);
return ss.str();
}

string getBase(BigDataType num, const unsigned int& toBase, const char * baseValue)
{
string baseNum = "";
while(num > 0){
baseNum += baseValue[num % toBase];
num /= toBase;
}
std::reverse(baseNum.begin(), baseNum.end());
return baseNum;
}

int main()
{

int numOfTestCases = 0;

cin >> numOfTestCases;

unsigned short *Answer = new unsigned short[numOfTestCases];
unsigned short ansIndx = 0;

const unsigned int MAX_BASE = 256;

char baseValue[MAX_BASE];

for(int i = 0; i < MAX_BASE; i++){
baseValue = char(i);
}

const BigDataType MAX = 10e10;

while(numOfTestCases--)
{
BigDataType num;

cin >> num;
if(num < 1 || num > MAX)
continue;

for(unsigned int base = 2; base < MAX_BASE; ++base)
{
if(isPalindrome( getBase( num, base, baseValue ) ) ){
break;
}
}
}

for(int i = 0;i < ansIndx; i++){
}

return 0;
}

Feel like a noob.

##### Share on other sites
What is the question?

##### Share on other sites
The site was telling me that my answer was wrong. But as far as I can see,
it should work. I thought there might be a special case that I haven't covered
that someone might see.

##### Share on other sites
You are only checking bases up to 255. Did you try checking to see if there are any numbers that go over that?

Also, if you're only checking for palindromes, there's no need to reverse the string before checking it. (Not that this affects the correctness of the code.)

##### Share on other sites
then how will i represent a base thats over 255 ?

##### Share on other sites
You could use a vector of ints.

Here's a modification of your code. I didn't test it, but it should give you the right idea.

typedef unsigned long Uint32;bool IsPalindromeInBase(BigDataType num, Uint32 base){    std::vector<Uint32> thestring;    	while(num > 0)	{		thestring.push_back(num % toBase);				num /= toBase;	}		for( Uint32 i =0; i < (thestring.size() - i); ++i)	{            if ( thestring.at(i) != thestring.at(thestring.size() - i) )            {                return false;            }	}		return true;}

##### Share on other sites
How about instead of storing your numbers as char's, you store them in a more general fashion, such as with your BigDataType type. Instead of using a string then, just use a vector of BigDataType's.

*edit*
Arg, ninja'd

##### Share on other sites
so you are suggesting that I should store a vector of ints instead of an array
of chars, and work with them the same way as I did with the chars?

What if the num % base return a 2 digits of greater number, then how will that
work?

##### Share on other sites
So I think I got it working, but obviously stepping through each base is not
efficient. Anyone want to hint me on some theory about bases?

##### Share on other sites
A quick search of Wikipedia didn't turn up anything particularly interesting, although it did confirm that some numbers do require bases larger then 255 to be palindromic. For example, 263 is not palindromic in any base below 262.

I doubt that there is any particular algorithm for this. Anyway, with small numbers like 10^10, it should be instantaneous on any modern processor.

It's only once you start using bignums that it becomes slow.

1. 1
2. 2
3. 3
4. 4
Rutin
11
5. 5

• 12
• 19
• 10
• 14
• 10
• ### Forum Statistics

• Total Topics
632665
• Total Posts
3007711
• ### Who's Online (See full list)

There are no registered users currently online

×


text:
# Abstracts

 2020-08-1013:13 [PUBDB-2020-02965] Abstract Virovets, A. ; Peresypkina, E. ; Scheer, M. Giant supramolecules as molecular containers European Crystallographic Meeting 2019, ECM 2019, ViennaVienna, Austria, 18 Aug 2019 - 23 Aug 2019   One of the most outstanding areas in the modern coordination chemistry is the rational design of giantsupramolecules built up from metal ions connected to each other via polytopic ligands resulting in large hollowcages. The systematic approach to the synthesis of hollow supramolecules developed in our group is thecoordination of Cu+ and Ag+ cations to phosphorus atoms of the pentaphosphaferrocenes, [CpRFe(hapta5-P5)] (CpR=hapta5-C5R5, R=Me (Cp*), CH2Ph (CpBn), etc.) [1-3]. [...] External link: Fulltext 2020-08-1013:07 [PUBDB-2020-02964] Abstract Peresypkina, E. ; Virovets, A. ; Scheer, M. Phosphorus can do more: $\pi–\pi$ stacking of planar aromatic P5-rings European Crystallographic Meeting 2019, ECM 2019, ViennaVienna, Austria, 18 Aug 2019 - 23 Aug 2019   The directed non-bonding interactions play an important role in modern supramolecular chemistry. Concerningphosphorus, so-called pnictogen bonding is usually mentioned in this context [1] [...] External link: Fulltext 2020-08-0417:30 [PUBDB-2020-02933] Abstract Altomare, M. ; Spanu, D. ; Recchia, S. ; et al Dewetting-Alloying of Nicu Bilayers on $TiO_{2}$ Surfaces for Noble Metal-Free Photocatalytic $H_{2}$ Evolution 237th Electrochemical Society (ECS) Meeting, MontrealMontreal, Canada, 10 May 2020 - 14 May 2020   We present an approach to fabricate an efficient noble metal-free photocatalytic platform for H2 evolution and provide evidences that the photocatalyst active state forms via a photo-induced redox process in organic-water mixtures.To fabricate the photocatalytic platform, NiCu bilayers (thickness in the range of a few nm) are deposited by Ar-plasma sputtering on anodic TiO2 nanocavity arrays.[1] A subsequent thermal treatment triggers solid-state dewetting[2,3] of the metal bilayer, i.e. owing to surface diffusion, the Ni and Cu films agglomerate and inter-mix forming NiCu bimetallic nanoparticles at the TiO2 surface.[4] This approach allows for a full control over key features of the NiCu nanoparticles, e.g. [...] External link: Fulltext 2019-12-1214:29 [PUBDB-2019-05105] Abstract Peruzzi, N. ; Bech, M. ; Dahlin, L. ; et al Evaluation of the enteric nervous system by three-dimensional holographic imaging in x-ray phase contrast nanotomography UEG Week, BarcelonaBarcelona, Spain, 21 Oct 2019 - 23 Oct 2019   IntroductionThe enteric nervous system (ENS) in dysmotility has been studied by classical light microscopy including immunohistochemistry. However, the procedure is rather time-consuming and only small components of the ENS in two dimensions can be analyzed. [...] 2018-12-1717:41 [PUBDB-2018-05629] Abstract Larsson, E. ; Ogurreck, M. ; Wilde, F. ; et al Evaluation of the XTM setup at the P05 Imaging Beamline at PETRA III using a sample of Nanoporous gold 24th International Congress on X-ray Optics and Microanalysis, ICXOM24, TriesteTrieste, Italy, 25 Sep 2017 - 29 Sep 2017 [10.3204/PUBDB-2018-05629]   Nanoporous gold (NPG) is the structure resultant from dealloying an Ag-rich AgAu alloy. It displays a high specific surface area, high electrical conductivity and good mechanical properties, making it very interesting for sensing and actuating applications [1]. [...] OpenAccess: PDF PDF (PDFA); External link: Fulltext 2018-12-1714:21 [PUBDB-2018-05607] Abstract Mertens, H. ; Flayhan, A. ; Loew, C. ; et al Membrane protein scaffold systems and SAXS characterization iNEXT Annual Users Meeting, ESRFESRF, France, 19 Mar 2018 - 21 Mar 2018   Infrastructure needed for the solution characterization of reconstituted membrane proteins (MPs) has been designed and implemented at the iNEXT partner synchrotron facilities Petra-III (P12, EMBL-HH) and SOLEIL (SWING, SOLEIL). HT-SEC-SAXS systems are now optimized for purification and screening and rapid structural data collection of MPs. [...] External link: Fulltext 2018-10-1214:04 [PUBDB-2018-03756] Abstract Gorelova, L. ; Pakhomova, A. ; Krivovichev, S. ; et al Paracelsian, $BaAl_{2}Si_{2}O_{8}$, under high pressure: three new phase transitions and three new high-pressure phases XX Meeting of the International Mineralogical Association, MelbourneMelbourne, Australia, 13 Aug 2018 - 17 Aug 2018   Minerals of the feldspar group are the most common minerals in the Earth’s crust. Due to their high geological relevance, numerous X-ray diffraction studies at non-ambient conditions (high temperature (HT) and / or pressure (HP)) have been performed with detailed studies focused on orthoclase, sanidine, microcline, albite, and anorthite. [...] 2018-08-1712:04 [PUBDB-2018-03011] Abstract Mazalova, V. ; Fromme, P. Influence of anchoring ligands on electronic and magnetic properties of heterobimetallic complexes 17th International Conference on X-ray Absorption Fine Structure, XAFS 2018, KrakowKrakow, Poland, 22 Jul 2018 - 27 Jul 2018   Magnetic molecules are envisaged as functional units in the molecular and supramolecular spintronic devices for future information technology. An essential first step in the implementation of the molecular systems in devices is the study and control of the molecule-electrode interfaces. [...] 2018-03-2211:34 [PUBDB-2018-01516] Abstract Flenner, S. ; Greving, I. ; Larsson, M. E. ; et al Structural investigations of spider attachment hairs Verhandlungen der Deutschen Physikalischen Gesellschaft e.V., BerlinBerlin, Germany, 11 Mar 2018 - 16 Mar 2018   The hairy attachment system of spiders enables these animals to walkupside-down on rough and smooth surfaces without the use of glue.These outstanding biological structures comprise of pads includinghundreds to thousands of specially designed hairs that are made ofcomposite materials consisting of proteins and reinforcing chitin fibres.The goal of our study is to gain an in-depth understanding of thestructure-function mechanism of the attachment and detachment processesof single hairs to a surface. X-ray Tomographic Microscopy andScanning X-ray nanobeam diffraction are ideal tools to reveal the innerstructure of the spider hairs and allow to determine the gradient of themechanical properties which is essential for the attachment process.With both techniques we found that the shaft of the attachment hairis hollow. [...] 2018-01-1015:42 [PUBDB-2018-00384] Abstract Sander, C. Searches for electroweak production of supersymmetric gauginos and sleptons with the ATLAS detector 25th International Conference on Supersymmetry and the unification of fundamental Interactions, SUSY17, Tata Institute of fundemental research,MumbaiTata Institute of fundemental research,Mumbai, India, 11 Dec 2017 - 15 Dec 2017   Many supersymmetric models feature gauginos and also sleptons withmasses less than a few hundred GeV. These can give rise to direct pairproduction rates at the LHC that can be observed in the data samplerecorded by the ATLAS detector [...]


text:
# the economic context of Russia in 1855

HideShow resource information
• Created by: mary2409
• Created on: 16-12-15 10:34
 P Q J M S Y V M A W U V V U C I U P R V R K I A I E L W G V T O W E P U P B L M F S J D Y R H F I J L T W P K E Q M C T L E U H A R F W A C W M E W Y T T F F H C J F X B K T S Q U Q S X I Y F T M K X X Q G C P P D S J G L P E S Y I J M J I A E Y F X V P U U I R A A R F Y K I C E M X K F X P O W J D N F N Y F V Y H C W A N V P H T L R T V N W C D M S L Y G N U Q M Y P E Q N Q P F I L V O E D P L I A Y K Y E X N K W E B E E R V W N F S A L A M U Q X W N E J K A V G J D N T G A U A Q U I I O V E W L A B J A J H I I E Y A S J I W T E E O B K S N O T I O N N J V H I I V P V A B X H M J B R T I T G K W I B K X T J P F L L Y Q J F C O L D E I M J S W R K H D L F G E B B H J C N J L N S E V L S S O F J O O O Y X C C I O A I D Q T W L U J O G X O S P T Q V A A N G T G S P O V T P F B A A O G D L R J W H N E S M Q M Y I A C L I L O F V J R X V O Q R Y B J D O W R B P Q U S C K C

### Clues

• the landowning elite were all reliant on an army off? (5)
• the ratio 11:1 relates to the number of Village to what dwellers? (4)
• what did the usual form of payment consist of? (7, 2, 4)
• what was the smallest social group? (10, 5)
• what was the term used to define the industry were villagers made small amounts of money (7, 8)
• what were the serfs communes called? (3)


text:
https://www.mscand.dk/issue/feed MATHEMATICA SCANDINAVICA 2020-04-06T03:48:40+02:00 Andrew Swann mscand@math.au.dk Open Journal Systems https://www.mscand.dk/article/view/114969 Low-dimensional bounded cohomology and extensions of groups 2020-04-06T03:48:40+02:00 Nicolaus Heuer mscand@math.au.dk
Bounded cohomology of groups was first studied by Gromov in 1982 in his seminal paper M. Gromov, Volume and bounded cohomology, Inst. Hautes Études Sci. Publ. Math. (1982), no. 56, 5–99. Since then it has sparked much research in Geometric Group Theory. However, it is notoriously hard to explicitly compute bounded cohomology, even for most basic “non-positively curved” groups. On the other hand, there is a well-known interpretation of ordinary group cohomology in dimension $2$ and $3$ in terms of group extensions. The aim of this paper is to make this interpretation available for bounded group cohomology. This will involve quasihomomorphisms as defined and studied by K. Fujiwara and M. Kapovich, On quasihomomorphisms with noncommutative targets, Geom. Funct. Anal. 26 (2016), no. 2, 478–519.
 2020-03-29T00:00:00+01:00 ##submission.copyrightStatement## https://www.mscand.dk/article/view/115970 Hopf algebra actions and transfer of Frobenius and symmetric properties 2020-04-06T03:48:29+02:00 S. Dăscălescu mscand@math.au.dk C. Năstăsescu mscand@math.au.dk L. Năstăsescu mscand@math.au.dk
If $H$ is a finite-dimensional Hopf algebra acting on a finite-dimensional algebra $A$, we investigate the transfer of the Frobenius and symmetric properties through the algebra extensions $A^H\subset A\subset A\mathbin{\#} H$.
 2020-03-29T00:00:00+01:00 ##submission.copyrightStatement## https://www.mscand.dk/article/view/116681 The weak Lefschetz property for quotients by quadratic monomials 2020-04-06T03:48:05+02:00 Juan Migliore mscand@math.au.dk Uwe Nagel mscand@math.au.dk Hal Schenck mscand@math.au.dk
Michałek and Miró-Roig, in J. Combin. Theory Ser. A 143 (2016), 66–87, give a beautiful geometric characterization of Artinian quotients by ideals generated by quadratic or cubic monomials, such that the multiplication map by a general linear form fails to be injective in the first nontrivial degree. Their work was motivated by conjectures of Ilardi and Mezzetti, Miró-Roig and Ottaviani, connecting the failure to Laplace equations and classical results of Togliatti on osculating planes. We study quotients by quadratic monomial ideals, explaining failure of the Weak Lefschetz Property for some cases not covered by Michałek and Miró-Roig.
 2020-03-29T00:00:00+01:00 ##submission.copyrightStatement## https://www.mscand.dk/article/view/117703 New characterizations of spacelike hyperplanes in the steady state space 2020-04-06T03:47:59+02:00 Cícero P. Aquino mscand@math.au.dk Halyson I. Baltazar mscand@math.au.dk Henrique F. de Lima mscand@math.au.dk
In this article, we deal with complete spacelike hypersurfaces immersed in an open region of the de Sitter space $\mathbb {S}^{n+1}_{1}$ which is known as the steady state space $\mathcal {H}^{n+1}$. Under suitable constraints on the behavior of the higher order mean curvatures of these hypersurfaces, we are able to prove that they must be spacelike hyperplanes of $\mathcal {H}^{n+1}$. Furthermore, through the analysis of the hyperbolic cylinders of $\mathcal {H}^{n+1}$, we discuss the importance of the main hypothesis in our results. Our approach is based on a generalized maximum principle at infinity for complete Riemannian manifolds.
 2020-03-29T00:00:00+01:00 ##submission.copyrightStatement## https://www.mscand.dk/article/view/115971 Theta-regularity and log-canonical threshold 2020-04-06T03:48:23+02:00 Morten Øygarden mscand@math.au.dk Sofia Tirabassi mscand@math.au.dk
We show that an inequality, proven by Küronya-Pintye, which governs the behavior of the log-canonical threshold of an ideal over $\mathbb {P}^n$ and that of its Castelnuovo-Mumford regularity, can be applied to the setting of principally polarized abelian varieties by substituting the Castelnuovo-Mumford regularity with Θ-regularity of Pareschi-Popa.
 2020-03-29T00:00:00+01:00 ##submission.copyrightStatement## https://www.mscand.dk/article/view/115624 Some operator inequalities for Hermitian Banach $*$-algebras 2020-04-06T03:48:34+02:00 Hamed Najafi mscand@math.au.dk
In this paper, we extend the Kubo-Ando theory from operator means on C$^{*}$-algebras to a Hermitian Banach $*$-algebra $\mathcal {A}$ with a continuous involution. For this purpose, we show that if $a$ and $b$ are self-adjoint elements in $\mathcal {A}$ with spectra in an interval $J$ such that $a \leq b$, then $f(a) \leq f(b)$ for every operator monotone function $f$ on $J$, where $f(a)$ and $f(b)$ are defined by the Riesz-Dunford integral. Moreover, we show that some convexity properties of the usual operator convex functions are preserved in the setting of Hermitian Banach $*$-algebras. In particular, Jensen's operator inequality is presented in these cases.
 2020-03-29T00:00:00+01:00 ##submission.copyrightStatement## https://www.mscand.dk/article/view/116147 Noncommutative coverings of quantum tori 2020-04-06T03:48:16+02:00 Kay Schwieger mscand@math.au.dk Stefan Wagner mscand@math.au.dk
We investigate a framework for coverings of noncommutative spaces. Furthermore, we study noncommutative coverings of irrational quantum tori and characterize all such coverings that are connected in a reasonable sense.
 2020-03-29T00:00:00+01:00 ##submission.copyrightStatement## https://www.mscand.dk/article/view/116243 Stability analysis of a delay differential Kaldor's model with government policies 2020-04-06T03:48:10+02:00 Tomás Caraballo mscand@math.au.dk Alex Pereira da Silva mscand@math.au.dk
This paper is devoted to analysis of the stability of the economy according to an extended version of Kaldor's economic growth model. We consider the role of the government and its simultaneous monetary and fiscal policies and we study whether or not a time delay between the recognition and the implementation of its fiscal policy can affect the economic stability. Numerical simulations provide further conclusions about the long-term behavior of the four variables modeled—namely, national income, capacity of production, bonds value and money supply.
 2020-03-29T00:00:00+01:00 ##submission.copyrightStatement## https://www.mscand.dk/article/view/119120 Backward shift invariant subspaces in reproducing kernel Hilbert spaces 2020-04-06T03:47:53+02:00 Emmanuel Fricain mscand@math.au.dk Javad Mashreghi mscand@math.au.dk Rishika Rupam mscand@math.au.dk
In this note, we describe the backward shift invariant subspaces for an abstract class of reproducing kernel Hilbert spaces. Our main result is inspired by a result of Sarason concerning de Branges-Rovnyak spaces (the non-extreme case). Furthermore, we give new applications in the context of the range space of co-analytic Toeplitz operators and sub-Bergman spaces.
 2020-03-29T00:00:00+01:00 ##submission.copyrightStatement## https://www.mscand.dk/article/view/119679 Issue covers 2020-03-29T18:36:15+02:00 Mathematica Scandinavica mscand@math.au.dk
Issue covers
 2020-03-29T00:00:00+01:00 ##submission.copyrightStatement## https://www.mscand.dk/article/view/119680 Volume title pages 2020-03-29T18:38:14+02:00 Mathematica Scandinavica mscand@math.au.dk
Volume title pages
 2020-03-29T00:00:00+01:00 ##submission.copyrightStatement##


text:
# Lab 5 - Calculating the cube root¶

By now, you should have some experience setting up a simple program. Let’s try another problem similar to our first homework problem. Instead of working on the square root problem, let’s see if we can figure out the cube root. This time, we will let a mathematician tell us how to do this!

## The Problem statement¶

If X is the number we want the cube root of, and A is our guess, then X should equal A*A*A.

### The scheme we will use¶

Here is what Isaac Newton has to say on the matter:

Start off with some guess for A. (You might try something simple like X/2 as a start.) Calculate each new guess using this formula:

A = 1/3 *( X/(A*A) + 2 * A)

Note

You might wonder why all those parentheses are in there. I want to make sure we ask the computer to evaluate the right formula.

The line above is an “assignment statement”. The variable “A” appears on both sides of the equal sign. On the right side, the value for “A” is the previous guess. We evaluate the formula to produce a new guess, and save this new guess in the variable “A” for the next pass through the loop. You stop when the difference between the previous guess and the next guess is small enough to suit you.

Using the basic flow of the lab4 as a guide, and the example we worked in class, create a new C++ program in a file called cuberoot.cpp. Your program should prompt the user for an input number. It should then use the scheme shown above to generate an initial guess for the cube root of that number. It should then loop generating a new guess until the guess is accurate enough to suite you. (You get to pick the accuracy, but it should be better than a few digits past the decimal point. Think about how accurate your calculator is and see if you can do at least that well.

You can read a number from the user using this:

double  mynum;

...

cin >> mynum;

This example reads in a real number (with a decimal point in it). The angle brackets go toward the variable that will receive the input. The user enters a number, then presses the “return” (or “enter”) key.

As you test your program, print out each guess using a line like this”

Current guess for the cube root is x.xxxxxx, this is off by x.xxxxx

You should see a number of these lines until you decide the accuracy is good enough.

Now, run the program on a number of values you pick. Make sure you see how well you are doing. Your final output should give the final answer to the user. You decide how to display that.

Note

There are hints on how to approach this problem in Homing in on an answer

## What to turn in¶

Submit your cuberoot.cpp program source file on Blackboard in the Lab6 Lab area.


text:
# logistic_regression¶

This module implements logistic regression for scenario discovery.

The module draws its inspiration from Quinn et al (2018) 10.1029/2018WR022743 and Lamontagne et al (2019). The implementation here generalizes their work and embeds it in a more typical scenario discovery workflow with a posteriori selection of the appropriate number of dimensions to include. It is modeled as much as possible on the api used for PRIM and CART.

class ema_workbench.analysis.logistic_regression.Logit(x, y, threshold=0.95)

Implements an interactive version of logistic regression using BIC based forward selection

Parameters: x (DataFrame) – y (numpy Array) – threshold (float) –
coverage

coverage of currently selected model

Type: float
density

density of currently selected model

Type: float
res_dim

number of restricted dimensions of currently selected model

Type: int
peeling_trajectory

stats for each model in peeling trajectory

Type: DataFrame
models

list of models associated with each model on the peeling trajectory

Type: list
inspect(i, step=0.1)

Inspect one of the models by showing the threshold tradeoff and summary2

Parameters: i (int) – step (float between [0, 1]) –
plot_pairwise_scatter(i, threshold=0.95)

plot pairwise scatter plot of data points, with contours as background

Parameters: i (int) – threshold (float) – Figure instance

The lower triangle background is a binary contour based on the specified threshold. All axis not shown are set to a default value in the middle of their range

The upper triangle shows a contour map with the conditional probability, again setting all non shown dimensions to a default value in the middle of their range.

run()

run logistic regression using forward selection using a Bayesian Information Criterion for selecting whether and if so which dimension to add

show_threshold_tradeoff(i, cmap=<matplotlib.colors.ListedColormap object>, step=0.1)

Visualize the trade off between coverage and density for a given model i across the range of threshold values

Parameters: i (int) – cmap (valid matplotlib colormap) – step (float, optional) – a Figure instance
show_tradeoff(cmap=<matplotlib.colors.ListedColormap object>)

Visualize the trade off between coverage and density. Color is used to denote the number of restricted dimensions.

Parameters: cmap (valid matplotlib colormap) – a Figure instance
update(model, selected)

helper function for adding a model to the colection of models and update the associated attributes

Parameters: model (statsmodel fitted logit model) – selected (list of str) –


text:
# allennlp.modules.seq2seq_encoders¶

Modules that transform a sequence of input vectors into a sequence of output vectors. Some are just basic wrappers around existing PyTorch modules, others are AllenNLP modules.

The available Seq2Seq encoders are

class allennlp.modules.seq2seq_encoders.pytorch_seq2seq_wrapper.PytorchSeq2SeqWrapper(module: torch.nn.modules.module.Module, stateful: bool = False) → None[source]

Pytorch’s RNNs have two outputs: the hidden state for every time step, and the hidden state at the last time step for every layer. We just want the first one as a single output. This wrapper pulls out that output, and adds a get_output_dim() method, which is useful if you want to, e.g., define a linear + softmax layer on top of this to get some distribution over a set of labels. The linear layer needs to know its input dimension before it is called, and you can get that from get_output_dim.

In order to be wrapped with this wrapper, a class must have the following members:

• self.input_size: int
• self.hidden_size: int
• def forward(inputs: PackedSequence, hidden_state: torch.autograd.Variable) -> Tuple[PackedSequence, torch.autograd.Variable].
• self.bidirectional: bool (optional)

This is what pytorch’s RNN’s look like - just make sure your class looks like those, and it should work.

Note that we require you to pass a binary mask of shape (batch_size, sequence_length) when you call this module, to avoid subtle bugs around masking. If you already have a PackedSequence you can pass None as the second parameter.

We support stateful RNNs where the final state from each batch is used as the initial state for the subsequent batch by passing stateful=True to the constructor.

forward(inputs: torch.FloatTensor, mask: torch.FloatTensor, hidden_state: torch.FloatTensor = None) → torch.FloatTensor[source]
get_input_dim() → int[source]
get_output_dim() → int[source]
class allennlp.modules.seq2seq_encoders.seq2seq_encoder.Seq2SeqEncoder(stateful: bool = False) → None[source]

Bases: allennlp.modules.encoder_base._EncoderBase, allennlp.common.registrable.Registrable

A Seq2SeqEncoder is a Module that takes as input a sequence of vectors and returns a modified sequence of vectors. Input shape: (batch_size, sequence_length, input_dim); output shape: (batch_size, sequence_length, output_dim).

We add two methods to the basic Module API: get_input_dim() and get_output_dim(). You might need this if you want to construct a Linear layer using the output of this encoder, or to raise sensible errors for mis-matching input dimensions.

classmethod from_params(params: allennlp.common.params.Params) → allennlp.modules.seq2seq_encoders.seq2seq_encoder.Seq2SeqEncoder[source]
get_input_dim() → int[source]

Returns the dimension of the vector input for each element in the sequence input to a Seq2SeqEncoder. This is not the shape of the input tensor, but the last element of that shape.

get_output_dim() → int[source]

Returns the dimension of each vector in the sequence output by this Seq2SeqEncoder. This is not the shape of the returned tensor, but the last element of that shape.

class allennlp.modules.seq2seq_encoders.intra_sentence_attention.IntraSentenceAttentionEncoder(input_dim: int, projection_dim: int = None, similarity_function: allennlp.modules.similarity_functions.similarity_function.SimilarityFunction = DotProductSimilarity( ), num_attention_heads: int = 1, combination: str = '1, 2', output_dim: int = None) → None[source]

An IntraSentenceAttentionEncoder is a Seq2SeqEncoder that merges the original word representations with an attention (for each word) over other words in the sentence. As a Seq2SeqEncoder, the input to this module is of shape (batch_size, num_tokens, input_dim), and the output is of shape (batch_size, num_tokens, output_dim).

We compute the attention using a configurable SimilarityFunction, which could have multiple attention heads. The operation for merging the original representations with the attended representations is also configurable (e.g., you can concatenate them, add them, multiply them, etc.).

Parameters: input_dim : int The dimension of the vector for each element in the input sequence; input_tensor.size(-1). projection_dim : int, optional If given, we will do a linear projection of the input sequence to this dimension before performing the attention-weighted sum. similarity_function : SimilarityFunction, optional The similarity function to use when computing attentions. Default is to use a dot product. num_attention_heads: int, optional If this is greater than one (default is 1), we will split the input into several “heads” to compute multi-headed weighted sums. Must be used with a multi-headed similarity function, and you almost certainly want to do a projection in conjunction with the multiple heads. combination : str, optional This string defines how we merge the original word representations with the result of the intra-sentence attention. This will be passed to combine_tensors(); see that function for more detail on exactly how this works, but some simple examples are "1,2" for concatenation (the default), "1+2" for adding the two, or "2" for only keeping the attention representation. output_dim : bool, optional (default = None) The dimension of an optional output projection.
forward(tokens: torch.FloatTensor, mask: torch.FloatTensor)[source]
classmethod from_params(params: allennlp.common.params.Params) → allennlp.modules.seq2seq_encoders.intra_sentence_attention.IntraSentenceAttentionEncoder[source]
get_input_dim() → int[source]

Returns the dimension of the vector input for each element in the sequence input to a Seq2SeqEncoder. This is not the shape of the input tensor, but the last element of that shape.

get_output_dim() → int[source]

Returns the dimension of each vector in the sequence output by this Seq2SeqEncoder. This is not the shape of the returned tensor, but the last element of that shape.

class allennlp.modules.seq2seq_encoders.stacked_self_attention.StackedSelfAttentionEncoder(input_dim: int, hidden_dim: int, projection_dim: int, feedforward_hidden_dim: int, num_layers: int, num_attention_heads: int, use_positional_encoding: bool = True, dropout_prob: float = 0.2) → None[source]

Implements a stacked self-attention encoder similar to the Transformer architecture in Attention is all you Need .

This encoder combines 3 layers in a ‘block’:

1. A 2 layer FeedForward network.
2. Multi-headed self attention, which uses 2 learnt linear projections to perform a dot-product similarity between every pair of elements scaled by the square root of the sequence length.
3. Layer Normalisation.

These are then stacked into num_layers layers.

Parameters: input_dim : int, required. The input dimension of the encoder. hidden_dim : int, required. The hidden dimension used for the _input_ to self attention layers and the _output_ from the feedforward layers. projection_dim : int, required. The dimension of the linear projections for the self-attention layers. feedforward_hidden_dim : int, required. The middle dimension of the FeedForward network. The input and output dimensions are fixed to ensure sizes match up for the self attention layers. num_layers : int, required. The number of stacked self attention -> feedfoward -> layer normalisation blocks. num_attention_heads : int, required. The number of attention heads to use per layer. use_positional_encoding: bool, optional, (default = True) Whether to add sinusoidal frequencies to the input tensor. This is strongly recommended, as without this feature, the self attention layers have no idea of absolute or relative position (as they are just computing pairwise similarity between vectors of elements), which can be important features for many tasks. dropout_prob : float, optional, (default = 0.2) The dropout probability for the feedforward network.
forward(inputs: torch.FloatTensor, mask: torch.FloatTensor)[source]
classmethod from_params(params: allennlp.common.params.Params)[source]
get_input_dim() → int[source]

Returns the dimension of the vector input for each element in the sequence input to a Seq2SeqEncoder. This is not the shape of the input tensor, but the last element of that shape.

get_output_dim() → int[source]

Returns the dimension of each vector in the sequence output by this Seq2SeqEncoder. This is not the shape of the returned tensor, but the last element of that shape.

class allennlp.modules.seq2seq_encoders.multi_head_self_attention.MultiHeadSelfAttention(num_heads: int, input_dim: int, attention_dim: int, values_dim: int, output_projection_dim: int = None, attention_dropout_prob: float = 0.1) → None[source]

This class implements the key-value scaled dot product attention mechanism detailed in the paper Attention is all you Need .

The attention mechanism is a weighted sum of a projection V of the inputs, with respect to the scaled, normalised dot product of Q and K, which are also both linear projections of the input. This procedure is repeated for each attention head, using different parameters.

Parameters: num_heads : int, required. The number of attention heads to use. input_dim : int, required. The size of the last dimension of the input tensor. attention_dim int, required. The total dimension of the query and key projections which comprise the dot product attention function. Must be divisible by num_heads. values_dim : int, required. The total dimension which the input is projected to for representing the values, which are combined using the attention. Must be divisible by num_heads. output_projection_dim : int, optional (default = None) The dimensionality of the final output projection. If this is not passed explicitly, the projection has size input_size. attention_dropout_prob : float, optional (default = 0.1). The dropout probability applied to the normalised attention distributions.
forward(inputs: torch.FloatTensor, mask: torch.LongTensor = None) → torch.FloatTensor[source]
Parameters: inputs : torch.FloatTensor, required. A tensor of shape (batch_size, timesteps, input_dim) mask : torch.FloatTensor, optional (default = None). A tensor of shape (batch_size, timesteps). A tensor of shape (batch_size, timesteps, output_projection_dim), where output_projection_dim = input_dim by default.
classmethod from_params(params: allennlp.common.params.Params) → allennlp.modules.seq2seq_encoders.multi_head_self_attention.MultiHeadSelfAttention[source]
get_input_dim()[source]
get_output_dim()[source]
class allennlp.modules.seq2seq_encoders.pass_through_encoder.PassThroughEncoder(input_dim: int) → None[source]

This class allows you to specify skipping a Seq2SeqEncoder just by changing a configuration file. This is useful for ablations and measuring the impact of different elements of your model.

forward(inputs: torch.FloatTensor, mask: torch.LongTensor = None) → torch.FloatTensor[source]
classmethod from_params(params: allennlp.common.params.Params) → allennlp.modules.seq2seq_encoders.pass_through_encoder.PassThroughEncoder[source]
get_input_dim() → int[source]
get_output_dim() → int[source]


text:
# File Manipulation script - remove first position in each row

Solved PowerShell
MSIEXEC How to get the result?

Hi All, I have a set of files that i need to clean up on a daily basis. Essentially i have to remove the first character of each row Unless it's a tab. (99% of the time it's a 1, 0, or Space character that needs removed)

I tried this in a batch, but batch doesn't handle it (some files are 25+ megs) and batch crashes out around 8mb

I have a "Working" Powershell script that does this by converting all the tabs to spaces, then deleting the first char in each row. However it doubles the file size in the process of replacing the tabs. I have no idea how to have it just skip the rows starting with tabs.

I'd like to make the process more efficient, there are at least 2 files a day, and up to 10, all in a single folder. So if it can process the whole folder in one shot, that would be great.

Here's the code i'm working with currently.

Any suggestions?

Powershell
function Expand-Tab {
param([UInt32] $TabWidth = 8) process {$line = $_ while ($TRUE ) {
$i =$line.IndexOf([Char] 9)
if ( $i -eq -1 ) { break } if ($TabWidth -gt 0 ) {
$pad = " " * ($TabWidth - ($i %$TabWidth))
} else {
$pad = "" }$line = $line -replace "^([^\t]{$i})\t(.*)$", "$1$pad$2"
}
$line } } Get-Content C:\folder\file.txt | Expand-Tab | Out-File C:\folder\file-detabbed.txt Get-Content -Path C:\folder\file-detabbed.txt | ForEach-Object {$_.substring(1,$_.Length - 1) } | Out-File C:\folder\file-cleaned.txt  Attached is a redacted sample file for testing. all letters replaced with X, and all numbers replaced with 5. I left the specials intact. Sample.txt (83 KB) Mace OP I don't know what you mean by skipping lines with tabs, if there are no tabs. Nevertheless, the following will remove the first character of each line and do so more efficiently that the built in cmdlets, especially if you have 25MB files. Powershell $in = 'T:\22\in.txt'
$out = 'T:\22\out.txt'$sr = New-Object -TypeName 'System.IO.StreamReader' -ArgumentList $in$sw = New-Object -TypeName 'System.IO.StreamWriter' -ArgumentList $out Do {$line = $sr.ReadLine()$sw.WriteLine((-Join $line[1..($line.Length - 1)]))

} Until ($sr.EndOfStream)$sw.Close()
$sr.Close()  Popular Topics in PowerShell TEST YOUR SMARTS Which of the following retains the information it's storing when the system power is turned off? • ROM • CPU • RAM • GPU 88% of IT pros got this right. ## 10 Replies · · · Chipotle OP Also attached an example of the sample file after it's been run through the existing script. 0 · · · Mace OP I was unable to find any tab characters in the input file you posted. 0 · · · Chipotle OP Yea i wasn't either until i started trying to processes it at such. It just skipped over them and removed the next letter or number in. You are able to see them if you open it in Notepad++ just about everything else i've tried shows them as just spaces. 0 · · · Mace OP I did open sample.txt in Notepad++. 0 · · · Chipotle OP I got the Tab-replacer script from this guy on Windows IT Pro, he explains a bit about why they don't show as tabs even though they are. 0 · · · Chipotle OP See all those "pipe" like vertical lines in there? You also have it on regular, not Extended. 0 · · · Mace OP Best Answer I don't know what you mean by skipping lines with tabs, if there are no tabs. Nevertheless, the following will remove the first character of each line and do so more efficiently that the built in cmdlets, especially if you have 25MB files. Powershell $in = 'T:\22\in.txt'
$out = 'T:\22\out.txt'$sr = New-Object -TypeName 'System.IO.StreamReader' -ArgumentList $in$sw = New-Object -TypeName 'System.IO.StreamWriter' -ArgumentList $out Do {$line = $sr.ReadLine()$sw.WriteLine((-Join $line[1..($line.Length - 1)]))

} Until ($sr.EndOfStream)$sw.Close()
\$sr.Close()

3
· · ·
Mace
OP

Those are 4 spaces.  The pipe looking things are just a visual spacing indicator for Notepad++, tabs show as -->.  And, \t works in Regular expression search.  There are no tabs in that file.

I'm not trying to come across as argumentative, but beyond what I've posted, I don't understand what you mean by skip lines with tabs.

0
· · ·
Mace
OP

And the sample result file you posted is twice as large because it somehow changed encoding (you can change it back to UTF-8 with Notepad++ to see that it'll shrink back down to size).  I didn't test the script you posted, but on my computer, the script I posted doesn't change the encoding.

0
· · ·
Chipotle
OP

Well i won't complain lol, it works, and keeps the files sizes from doubling.

The first batch script i made for it was skipping the white spaces and deleting the first letter instead of the space area. Running the tab conversion did fix that problem until i ran into a wall with the line length at 8mb.

Anywho thanks!

0

This topic has been locked by an administrator and is no longer open for commenting.


text:
# How to expand an infinite product?

How can I use Mathematica to expand such a product (only need a finite number of terms):

$$\prod^{\infty}_{n=1}\frac{({1-yq^{n+1}})({1-y^{-1}q^n})}{(1-q^n)^2}$$

• Have you seen QPochhammer[]? Feb 23 '16 at 9:51

If you follow @J.M. 's hint and assume that 0 < q < 1, you can get a value for the infinite product:

Product[(1 - y q^(n + 1)) (1 - q^n/y)/(1 - q^n)^2,
{n, 1, ∞},
Assumptions -> 0 < q < 1]

with result

-((y QPochhammer[1/y, q] QPochhammer[q y, q])/((-1 + y) (-1 + q y) QPochhammer[q, q]^2))

Given that you only need a finite number of terms, I would do something like this:

ClearAll[prod, expand];
prod[num_?NumericQ] :=Product[(1 - y*q^(n + 1))*(1 - q^n/y)/(1 -q^n)^2, {n, 1, num}];
expand[num_?NumericQ] := Total[Total[#] & /@ Numerator[#]/Flatten[DeleteDuplicates[#] & /@ Denominator[#]] &@GatherBy[List @@ Expand[prod[num]], Denominator]]

Of course, you can just run Expand on your product. But do it and observe the longish result. So my approach (which I bet is not the most beautiful one to accomplish this, btw) gathers by common denominators and sums their respective numerators. This, at least to me, makes the expanded result way more readable. Of course, that depends on what you want to do with your result. Example:

Of course, you can also run Simplify on such constructs, but that will for sure need more time. However, there you may specify TransformationFunctions to end up with a form of your desire.

AbsoluteTiming of Simplify@Expand@prod[4]: 0.134552

AbsoluteTiming of expand[4]: 0.009244