commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Tompkins (JIRA)" <>
Subject [jira] [Commented] (MATH-1290) Additions to Complex Utils; creation of conversion methods between Complex[], double[], float[], and interleaved arrays
Date Sat, 09 Apr 2016 02:56:25 GMT


Rob Tompkins commented on MATH-1290:

I think I would proceed in the following manner assuming we're trying to merge Eric's {{feature-MATH-1290}}
into the main apache commons-math {{develop}} branch (or master either should work). From
a clean directory on Gilles' machine I would run the following:
git clone git://
cd commons-math
git remote add ericbarnhill
git fetch --all
git checkout -b feature-MATH-1290 ericbarnhill/feature-MATH-1290
<<Make and commit any needed changes to the branch here>>
git checkout -b develop origin/develop
git merge feature-MATH-1290
<<This should open vi and allow a commit message>>
git push origin develop
The explanation of the mechanics at play here follows below. Pardon my long-windedness. 
It looks like to me that what we're trying to do here is get Eric's branch {{feature-MATH-1290}}
merged into the main repository's either {{master}} or {{develop}} branch. At a quick glance,
it appears that either are reasonable choices, but for the exercise we only need one, so let's
choose {{develop}}.

For the sake of discussion here, let's refer to Eric's repository {{}}
as {{ericbarnhill}} and the apache repository {{git://}}, to
which Gilles makes his commits, as {{upstream}}. Before going any further, we'll do a quick
overview on the way git (unlike subversion) can handle working with a collection of repositories
that are remote to one's machine. When we run the command:

git clone git://
what happens is two fold: (1) git copies the whole repository to your machine, and (2) git
creates a named reference of the location from which you copied the repository, the default
name here is "origin." Now, once working from the directory into which git copied the files,
presumably based on the command above, {{./commons-math}} we can add more repositories that
we wish to use for collaboration each of which we can give a name. Let's take my current local
setup as an  example, and consider the following commands run in succession, knowing the my
copy of commons-math exists in the location {{}}
git clone
cd ./commons-math
git remote add upstream git://
git remote add ericbarnhill
git fetch --all
What happens here is creates my repo locally, with it linked by default with my github "chtompki"
location. I then add other repositories from which I want to work, namely {{ericbarnhill}}
the name we've given Eric's repository, and {{upstream}} the name we've given the main apache
commons-math repo. Lastly, I've run the fetch command to get all of the branches from each
of the respective repositories.

Now, we have quite the collection of branches. If we run the git list branches command
git branch -a
we see a host of repeated branches. We should see most of our branches listed in the form
{{remotes/<name-we-gave-our-remote>/branch-name}}. For example we should see the following
occur some where in our list
each of which represents the state of that branch in each location. Now to move onto one of
these branches, all we need run is:
git checkout ericbarnhill/master
and that puts us on the master branch of Eric's repository with the state that it was in when
we ran the {{git fetch --all}} command, but because it's a remote reference, git will not
let us commit to that branch. Thus we might want to create a working branch from the remote
branch, which we could do in the following manner:
git checkout -b <branch-name-of-our-choosing> ericbarnhill/master
Now we are on a working copy of Eric's {{master}} branch and can work from there.

> Additions to Complex Utils; creation of conversion methods between Complex[], double[],
float[], and interleaved arrays
> -----------------------------------------------------------------------------------------------------------------------
>                 Key: MATH-1290
>                 URL:
>             Project: Commons Math
>          Issue Type: Improvement
>    Affects Versions: 3.5
>            Reporter: Eric Barnhill
>            Priority: Minor
>              Labels: newbie, patch
>             Fix For: 4.0
>         Attachments:,,,,,,,,
>   Original Estimate: 24h
>  Remaining Estimate: 24h
> I propose to add several new methods to the ComplexUtils class enabling easy conversion
between Complex[] arrays, real or imaginary double[] or float[] arrays, and interleaved complex
double[] or float[] arrays. The last two in particular are beneficial to have for OpenCL implementations
and the JTransforms library.

This message was sent by Atlassian JIRA

View raw message