Skip to content

How to match both k and -k with sets? #821

@veretin

Description

@veretin

Hi!

I want to match both +k and -k in one line with set restriction.
Is it possible? In this case "k" is a vector

v k,k1,k2, p, q;
set kk: k, k1, k2;
c A;

g ff1 = A(k);
g ff2 = A(-k);

id A(k?kk) = 0;
id A(-k?kk) = 0;

print;
.end

We need 2 lines to capture both. Can we do this in one line?
Regards,
OVeretin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions