Not
Bu sayfaya erişim yetkilendirme gerektiriyor. Oturum açmayı veya dizinleri değiştirmeyi deneyebilirsiniz.
Bu sayfaya erişim yetkilendirme gerektiriyor. Dizinleri değiştirmeyi deneyebilirsiniz.
<hash_set> Üst bilgi aşağıdaki işleçleri sağlar:
işleç!=
Not
Bu, API artık kullanılmıyor. Alternatif olarak sınıfı unordered_set.
İşlecin sol tarafındaki hash_set nesnesinin sağ taraftaki hash_set nesnesine eşit olup olmadığını sınar.
bool operator!=(const hash_set <Key, Traits, Allocator>& left, const hash_set <Key, Traits, Allocator>& right);
Parametreler
Sol
hash_set türünün bir nesnesi.
Sağ
hash_set türünün bir nesnesi.
Dönüş Değeri
true hash_sets eşit değilse; false hash_sets eşitse.
Açıklamalar
hash_set nesneleri arasındaki karşılaştırma, öğeleri arasındaki çift tabanlı karşılaştırmayı temel alır. İki hash_sets, aynı sayıda öğeye sahipse ve ilgili öğeleri aynı değerlere sahipse eşittir. Aksi takdirde eşit değillerdir.
< > ve<> üst bilgi dosyalarının üyeleri stdext Ad Alanındadır.
Örnek
// hash_set_op_ne.cpp
// compile with: /EHsc
#include <hash_set>
#include <iostream>
int main( )
{
using namespace std;
using namespace stdext;
hash_set <int> hs1, hs2, hs3;
int i;
for ( i = 0 ; i < 3 ; i++ )
{
hs1.insert ( i );
hs2.insert ( i * i );
hs3.insert ( i );
}
if ( hs1 != hs2 )
cout << "The hash_sets hs1 and hs2 are not equal." << endl;
else
cout << "The hash_sets hs1 and hs2 are equal." << endl;
if ( hs1 != hs3 )
cout << "The hash_sets hs1 and hs3 are not equal." << endl;
else
cout << "The hash_sets hs1 and hs3 are equal." << endl;
}
The hash_sets hs1 and hs2 are not equal.
The hash_sets hs1 and hs3 are equal.
operator==
Not
Bu, API artık kullanılmıyor. Alternatif olarak sınıfı unordered_set.
İşlecin sol tarafındaki hash_set nesnesinin sağ taraftaki hash_set nesnesine eşit olup olmadığını sınar.
bool operator!==(const hash_set <Key, Traits, Allocator>& left, const hash_set <Key, Traits, Allocator>& right);
Parametreler
Sol
hash_set türünün bir nesnesi.
Sağ
hash_set türünün bir nesnesi.
Dönüş Değeri
true işlecin sol tarafındaki hash_set işlecin sağ tarafındaki hash_set eşitse; aksi takdirde false.
Açıklamalar
hash_set nesneleri arasındaki karşılaştırma, öğelerinin çift tabanlı karşılaştırmasını temel alır. İki hash_sets, aynı sayıda öğeye sahipse ve ilgili öğeleri aynı değerlere sahipse eşittir. Aksi takdirde eşit değillerdir.
Örnek
// hash_set_op_eq.cpp
// compile with: /EHsc
#include <hash_set>
#include <iostream>
int main( )
{
using namespace std;
using namespace stdext;
hash_set <int> s1, s2, s3;
int i;
for ( i = 0 ; i < 3 ; i++ )
{
s1.insert ( i );
s2.insert ( i * i );
s3.insert ( i );
}
if ( s1 == s2 )
cout << "The hash_sets s1 and s2 are equal." << endl;
else
cout << "The hash_sets s1 and s2 are not equal." << endl;
if ( s1 == s3 )
cout << "The hash_sets s1 and s3 are equal." << endl;
else
cout << "The hash_sets s1 and s3 are not equal." << endl;
}
The hash_sets s1 and s2 are not equal.
The hash_sets s1 and s3 are equal.
operator!= (hash_multiset)
Not
Bu, API artık kullanılmıyor. Alternatif olarak sınıfı unordered_set.
İşlecin sol tarafındaki hash_multiset nesnesinin sağ taraftaki hash_multiset nesnesine eşit olup olmadığını sınar.
bool operator!=(const hash_multiset <Key, Traits, Allocator>& left, const hash_multiset <Key, Traits, Allocator>& right);
Parametreler
Sol
hash_multiset türünün bir nesnesi.
Sağ
hash_multiset türünün bir nesnesi.
Dönüş Değeri
true hash_multisets eşit değilse; false hash_multisets eşitse.
Açıklamalar
hash_multiset nesneleri arasındaki karşılaştırma, öğeleri arasındaki çift tabanlı karşılaştırmayı temel alır. İki hash_multisets, aynı sayıda öğeye sahipse ve ilgili öğeleri aynı değerlere sahipse eşittir. Aksi takdirde eşit değillerdir.
Örnek
// hashset_op_ne.cpp
// compile with: /EHsc
#include <hash_set>
#include <iostream>
int main( )
{
using namespace std;
using namespace stdext;
hash_multiset <int> hs1, hs2, hs3;
int i;
for ( i = 0 ; i < 3 ; i++ )
{
hs1.insert ( i );
hs2.insert ( i * i );
hs3.insert ( i );
}
if ( hs1 != hs2 )
cout << "The hash_multisets hs1 and hs2 are not equal." << endl;
else
cout << "The hash_multisets hs1 and hs2 are equal." << endl;
if ( hs1 != hs3 )
cout << "The hash_multisets hs1 and hs3 are not equal." << endl;
else
cout << "The hash_multisets hs1 and hs3 are equal." << endl;
}
The hash_multisets hs1 and hs2 are not equal.
The hash_multisets hs1 and hs3 are equal.
operator== (hash_multiset)
Not
Bu, API artık kullanılmıyor. Alternatif olarak sınıfı unordered_set.
İşlecin sol tarafındaki hash_multiset nesnesinin sağ taraftaki hash_multiset nesnesine eşit olup olmadığını sınar.
bool operator!==(const hash_multiset <Key, Traits, Allocator>& left, const hash_multiset <Key, Traits, Allocator>& right);
Parametreler
Sol
hash_multiset türünün bir nesnesi.
Sağ
hash_multiset türünün bir nesnesi.
Dönüş Değeri
true işlecin sol tarafındaki hash_multiset işlecin sağ tarafındaki hash_multiset eşitse; aksi takdirde false.
Açıklamalar
hash_multiset nesneleri arasındaki karşılaştırma, öğelerinin çift tabanlı karşılaştırmasını temel alır. İki hash_multisets, aynı sayıda öğeye sahipse ve ilgili öğeleri aynı değerlere sahipse eşittir. Aksi takdirde eşit değillerdir.
Örnek
// hash_multiset_op_eq.cpp
// compile with: /EHsc
#include <hash_set>
#include <iostream>
int main( )
{
using namespace std;
using namespace stdext;
hash_multiset <int> s1, s2, s3;
int i;
for ( i = 0 ; i < 3 ; i++ )
{
s1.insert ( i );
s2.insert ( i * i );
s3.insert ( i );
}
if ( s1 == s2 )
cout << "The hash_multisets s1 and s2 are equal." << endl;
else
cout << "The hash_multisets s1 and s2 are not equal." << endl;
if ( s1 == s3 )
cout << "The hash_multisets s1 and s2 are equal." << endl;
else
cout << "The hash_multisets s1 and s2 are not equal." << endl;
}
The hash_multisets s1 and s2 are not equal.
The hash_multisets s1 and s2 are equal.