cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community email notifications are disrupted. While we are working to resolve, please check on your favorite boards regularly to keep up with your conversations and new topics.

Correct term for this??

StuartBruff
23-Emerald II

Correct term for this??

It's been a long day and what passes for my brain has been too busy looking at requirements and solving real world problems to be bothered with pretending to think anymore.

I have just written a function to split a matrix into as many components as there are unique values (keys) in a given column. I cannot for the life of me remember what the name of this type of operation is. The word 'partition' is running through my head, but that's not what this operation is 😞

Can somebody please help?

Thanks,

Stuart

eg,

Array
0 1 2
0 2 3
1 2 4
2 3 5

goes to

sub array
0 1 2
0 2 3
sub array
1 2 4
sub array
2 3 5
16 REPLIES 16

I believe that the word that you are searching is set, not partition.

Regards. Alvaro.

On 12/3/2009 4:21:59 PM, adiaz wrote:
== I believe that the word that you are searching
is set, not partition.

Not quite, Alvaro.

I want to 'partition' the array into subarrays,
such that, for each subarray, the element in
column n is the same. Each row is preserved.

(well, when I say 'want', I've already written the
function to do it, I just can't decide what to
call it!!! - I've got another function called
partition that I use to create block matrices and
I have a set function which is very similar to
yours.

Stuart

A:=

0 1 2 3
0 1 2 3
1 1 2 3
1 1 2 3
2 1 2 3

would give

P0
0 1 2 3
0 1 2 3

P1
1 1 2 3
1 1 2 3

P2
2 1 2 3

On 12/3/2009 5:04:12 PM, stuartafbruff wrote:

>I want to 'partition' the array into subarrays,
>such that, for each subarray, the element in
>column n is the same. Each row is preserved.

Oh, I see now. What you have it is a partion then, but a restricted one (that I remember restricted partitions as name is introduced into the number theory for the partition of a number -decompose it into summands- and to eval some Lebesgue integrals in real number theory). Could be the name RestrictedPartitionEqualRows?

>I have a set function which is very similar to yours.

Let me correct you: You don't have a set function similar to mine, you have the ORIGINAL set function, and I only have a modified (only add sort and change the origin, of course) of your set function, which I remember that I take from the collab, but forgot to annotate the author.

Regards. Alvaro.

More:

If you call P as partition of A then A it is a set of five R4 vectors, this because if P it's a partition, then UP = A.

In the set of all Partitions of this set (set of rows as vectors) you find the partition that have equals elements (vectors) as elements of each subset of the partition (lang puzzle).

So, I recommend that you assing vectors as column vectors, which is more usual, redefining your function only trasposing it argument before evaluating anything, and then call as RestrictedPartitionEqual. As the argument is a collection of vectors from a vectorial space (of dimension rows(A)) it is enough general to have a nice name, but can't think in other better (and short).

Regards. Alvaro.

Sounds like the relational algebra group by operation.
__________________
� � � � Tom Gutman

On 12/3/2009 2:58:05 PM, stuartafbruff wrote:
...
>Can somebody please help?
>
>Thanks,
>
>Stuart
___________________________

Stuart,

You will have no problem undertanding the gear in there. The search by a "set of common" is easy, you then have to design the "mask". Extracting the matched sets is easy too. The all lot to be explored in a circular search for all the vectors of condition. It might end a bit big !!!

I will "salut les Anglais", Sunday 07:30

Jean

Stuart,

... the mask is easy to add.
At this stage, it seems possible to rotate all the matching searches using the Mathcad "rotate function". This one has been posted many times, but no recollection where to point in this collab. Maybe simpler than that, don't know yet.

Correct term for this ??...
"matching sets" ?
"sets Sort-Extract" ?

Jean

... does not work with duplicates !!!

"simply deceptive"

Jean

It may be deja vu that has you believing it's not a new operation that you just created. In this case, you should have naming rights. since it's your type of partition, you could call it the Stupar operator. If the object is to port the resulting subarrays for use elsewhere, yuo could call it the Stupor operator (perhaps also descriptive of the user's condition :-).

Lou
StuartBruff
23-Emerald II
(To:LouP)

On 12/4/2009 10:07:28 AM, lpoulo wrote:
== It may be deja vu

What? Again?

== that has you believing it's not a new operation that you just created. In this case, you should have naming rights. since it's your type of partition, you could call it the Stupar operator. If the object is to port the resulting subarrays for use elsewhere, yuo could call it the Stupor operator (perhaps also descriptive of the user's condition :-).

You'll be pleased to know I've just put out a contract on you.

I instantly thought of generalizing your suggestion, thus creating the Super Stupor operator. No problem with that, but unfortunately (for both of us) it also instantly set off the music machine in my head, accompanying the name of the new operator to Abba's "Super Trouper".

Ever seen Terminator?

Stuart
RichardJ
19-Tanzanite
(To:StuartBruff)

On 12/4/2009 10:18:38 AM, stuartafbruff wrote:

>I instantly thought of generalizing your
>suggestion

Perhaps you should create an operator for Proportional Intergral Differential control.

Richard
StuartBruff
23-Emerald II
(To:RichardJ)

On 12/4/2009 10:43:01 AM, rijackson wrote:
>>I instantly thought of generalizing your suggestion
== Perhaps you should create an operator for Proportional Intergral Differential control.

Hah! I'm not falling into that trap. You obviously think I'm stupidor than I look (my, what an imagination you've got)

Stuart

On 12/4/2009 10:18:38 AM, stuartafbruff wrote:
>
>You'll be pleased to know I've just put
>out a contract on you.

What suit, or is it no-trump? I double in any case.

>I instantly thought of generalizing your
>suggestion, thus creating the Super
>Stupor operator. No problem with that,
>but unfortunately (for both of us) it
>also instantly set off the music machine
>in my head, accompanying the name of the
>new operator to Abba's "Super Trouper".
>
>Ever seen Terminator?
Lots of them. Aren't these the last terms in finite length series (always thinking math!). We can always hope that this thread will have one, rather than be interminable.

With regard to Richard's operator and your matrix operations, you may be interested in only the Matrix Operator Significant Terms when applying the Proportional Integral Differential version of the operator. (Yes, it's that time on Friday...)

Lou
StuartBruff
23-Emerald II
(To:LouP)

On 12/4/2009 4:56:13 PM, lpoulo wrote:
>On 12/4/2009 10:18:38 AM, stuartafbruff wrote:
>You'll be pleased to know I've just put out a
contract on you.
== What suit,

Black ones, with balaclavas - don't stand near any
balconies.

== or is it no-trump?

It will be difficult to trump.


== I double in any case.

I rest my case.

>I instantly thought of generalizing your
>suggestion, thus creating the Super
>Stupor operator. No problem with that,
>but unfortunately (for both of us) it
>also instantly set off the music machine
>in my head, accompanying the name of the
>new operator to Abba's "Super Trouper".
>
>Ever seen Terminator?
== Lots of them. Aren't these the last terms in
finite length series (always thinking math!).

No. They never stop, they never give in
<vbeg>

== With regard to Richard's operator and your
matrix operations, you may be interested in only
the Matrix Operator Significant Terms when
applying the Proportional Integral Differential
version of the operator.

Ah. You're thinking of Proportional Integral
Differential Estimator?

== (Yes, it's that time on Friday...)

It's way past that time over here, but ... I'll Be
Back

On 12/4/2009 10:07:28 AM, lpoulo wrote:
>It may be deja vu that has you
>believing it's not a new
>operation that you just
>created.
...>Lou
_______________________________

"Deja vu", yes.

Years ago I have done a very similar project for Collin "Wheat & chaff". That one is a bit different and a lot quicker to administrate. To me simply a "Locate" project ... a "mask search" ...

Visit my reply few minutes ago.

jmG

..."deceptively simple !"
Try to loop over 'select' for an expected nested result.

Jean
Top Tags